From a26f7d58aac9951163c6064e2d70487b56c68608 Mon Sep 17 00:00:00 2001 From: Ryo Date: Thu, 23 Oct 2025 21:20:41 +0800 Subject: [PATCH] refactor: restructure crossdomain package layout (#2377) --- .../api/handler/coze/workflow_service_test.go | 44 +++++++-------- backend/application/app/app.go | 6 +- backend/application/application.go | 56 +++++++++---------- backend/application/conversation/agent_run.go | 4 +- backend/application/conversation/message.go | 2 +- .../conversation/openapi_agent_run.go | 6 +- .../conversation/openapi_agent_run_test.go | 2 +- .../conversation/openapi_message.go | 18 +++--- backend/application/knowledge/convertor.go | 40 +++++++------ backend/application/knowledge/knowledge.go | 2 +- backend/application/memory/convertor.go | 2 +- backend/application/memory/database.go | 4 +- backend/application/memory/variables.go | 2 +- backend/application/plugin/api_management.go | 8 +-- backend/application/plugin/info.go | 6 +- backend/application/plugin/lifecycle.go | 2 +- backend/application/plugin/playground.go | 2 +- backend/application/plugin/plugin.go | 4 +- backend/application/plugin/plugin_test.go | 4 +- backend/application/plugin/registration.go | 6 +- backend/application/search/project_search.go | 2 +- backend/application/search/resource_pack.go | 2 +- backend/application/search/resource_search.go | 2 +- backend/application/singleagent/create.go | 2 +- backend/application/singleagent/get.go | 8 +-- backend/application/singleagent/publish.go | 2 +- .../application/singleagent/single_agent.go | 8 +-- backend/application/workflow/chatflow.go | 12 ++-- backend/application/workflow/chatflow_test.go | 10 ++-- backend/application/workflow/workflow.go | 10 ++-- .../single_agent.go => agent/contract.go} | 14 +++-- .../impl}/single_agent.go | 8 +-- .../agent/model}/single_agent.go | 10 ++-- .../agentrun/agentrunmock/agent_run_mock.go | 0 .../agent_run.go => agentrun/contract.go} | 0 .../agentrun => agentrun/impl}/agent_run.go | 4 +- .../agentrun/model}/agent_run.go | 22 ++++---- .../connector.go => connector/contract.go} | 8 +-- .../connector => connector/impl}/connector.go | 6 +- .../connector/model}/connector.go | 2 +- .../contract/knowledge/knowledge.go | 45 --------------- .../contract.go} | 4 +- .../conversationmock/conversation_mock.go | 4 +- .../impl}/conversation.go | 6 +- .../conversation/model}/conversation.go | 2 +- .../database.go => database/contract.go} | 4 +- .../database/databasemock/database_mock.go | 2 +- .../database => database/impl}/database.go | 6 +- .../database/model}/const.go | 2 +- .../database/model}/database.go | 2 +- .../datacopy.go => datacopy/contract.go} | 0 .../datacopy => datacopy/impl}/datacopy.go | 4 +- backend/crossdomain/datacopy/model/.gitkeep | 0 backend/crossdomain/knowledge/contract.go | 45 +++++++++++++++ .../knowledge => knowledge/impl}/knowledge.go | 13 ++--- .../knowledge/knowledgemock/knowledge_mock.go | 2 +- .../knowledge/model}/knowledge.go | 2 +- .../message.go => message/contract.go} | 22 ++++---- .../{impl/message => message/impl}/message.go | 8 +-- .../message => message/impl}/message_test.go | 6 +- .../message/messagemock/message_mock.go | 4 +- .../message/model}/message.go | 2 +- .../{contract => }/plugin/consts/consts.go | 0 .../plugin/plugin.go => plugin/contract.go} | 4 +- .../{contract => }/plugin/convert/api/api.go | 6 +- .../{contract => }/plugin/convert/auth.go | 2 +- .../{contract => }/plugin/convert/format.go | 2 +- .../{contract => }/plugin/convert/http.go | 0 .../{contract => }/plugin/convert/param.go | 2 +- .../{contract => }/plugin/convert/plugin.go | 2 +- .../{impl/plugin => plugin/impl}/plugin.go | 6 +- .../{contract => }/plugin/model/default.go | 2 +- .../{contract => }/plugin/model/openapi.go | 2 +- .../{contract => }/plugin/model/option.go | 2 +- .../{contract => }/plugin/model/plugin.go | 0 .../plugin/model/plugin_manifest.go | 2 +- .../plugin/model/plugin_method.go | 0 .../{contract => }/plugin/model/toolinfo.go | 4 +- .../plugin/pluginmock/plugin_mock.go | 4 +- .../search/search.go => search/contract.go} | 2 +- .../{impl/search => search/impl}/search.go | 6 +- .../search/model}/resource_doc.go | 2 +- .../search/model}/search.go | 2 +- .../upload/upload.go => upload/contract.go} | 0 .../{impl/upload => upload/impl}/upload.go | 4 +- .../upload/uploadmock/upload_mock.go | 0 .../user/user.go => user/contract.go} | 0 .../crossuser.go => user/impl/user.go} | 4 +- .../varibales.go => variables/contract.go} | 2 +- .../variables => variables/impl}/variables.go | 6 +- .../variables/model}/variable_instance.go | 2 +- .../workflow.go => workflow/contract.go} | 2 +- .../workflow => workflow/impl}/workflow.go | 6 +- .../workflow/model}/workflow.go | 4 +- .../agent/singleagent/entity/agent_event.go | 6 +- .../agent/singleagent/entity/single_agent.go | 10 ++-- .../internal/agentflow/agent_flow_runner.go | 6 +- .../agentflow/callback_reply_chunk.go | 8 +-- .../internal/agentflow/node_retriever.go | 4 +- .../internal/agentflow/node_tool_database.go | 4 +- .../internal/agentflow/node_tool_knowledge.go | 2 +- .../internal/agentflow/node_tool_plugin.go | 6 +- .../agentflow/node_tool_pre_retriever.go | 12 ++-- .../internal/agentflow/node_tool_variables.go | 4 +- .../internal/agentflow/node_tool_workflow.go | 4 +- .../internal/dal/single_agent_draft.go | 2 +- .../internal/dal/single_agent_version.go | 2 +- .../agent/singleagent/service/publish.go | 2 +- .../singleagent/service/single_agent_impl.go | 4 +- backend/domain/app/service/publish_app.go | 6 +- backend/domain/app/service/service.go | 2 +- backend/domain/app/service/service_impl.go | 16 +++--- backend/domain/connector/entity/connector.go | 4 +- .../connector/service/connector_impl.go | 2 +- .../agentrun/entity/run_record.go | 6 +- .../agentrun/internal/agent_info.go | 4 +- .../agentrun/internal/chatflow_run.go | 6 +- .../internal/dal/model/run_record.gen.go | 2 +- .../agentrun/internal/message_builder.go | 10 ++-- .../agentrun/internal/message_event.go | 10 ++-- .../conversation/agentrun/internal/run.go | 6 +- .../agentrun/internal/run_process_event.go | 2 +- .../agentrun/internal/singleagent_run.go | 10 ++-- .../conversation/entity/conversation.go | 6 +- .../conversation/internal/dal/dao.go | 2 +- .../conversation/service/conversation_test.go | 2 +- .../conversation/message/entity/message.go | 22 ++++---- .../message/internal/dal/message.go | 2 +- .../message/repository/repository.go | 2 +- .../message/service/message_impl.go | 2 +- .../message/service/message_test.go | 2 +- backend/domain/knowledge/entity/document.go | 6 +- backend/domain/knowledge/entity/knowledge.go | 4 +- backend/domain/knowledge/entity/slice.go | 4 +- backend/domain/knowledge/entity/strategy.go | 4 +- .../domain/knowledge/processor/impl/base.go | 2 +- .../knowledge/processor/impl/custom_table.go | 4 +- .../domain/knowledge/processor/impl/init.go | 5 +- .../domain/knowledge/processor/impl/utils.go | 2 +- backend/domain/knowledge/service/convert.go | 19 +++---- backend/domain/knowledge/service/datacopy.go | 4 +- .../domain/knowledge/service/event_handle.go | 2 +- backend/domain/knowledge/service/interface.go | 2 +- backend/domain/knowledge/service/knowledge.go | 5 +- .../service/knowledge_integration_test.go | 2 +- .../knowledge/service/knowledge_test.go | 2 +- backend/domain/knowledge/service/rdb.go | 2 +- backend/domain/knowledge/service/retrieve.go | 2 +- backend/domain/knowledge/service/sheet.go | 2 +- .../domain/knowledge/service/sheet_test.go | 2 +- backend/domain/knowledge/service/validate.go | 2 +- .../domain/memory/database/entity/database.go | 6 +- .../database/internal/convertor/types.go | 2 +- .../internal/dal/agent_to_database.go | 2 +- .../internal/dal/draft_database_info.go | 2 +- .../dal/model/draft_database_info.gen.go | 2 +- .../dal/model/online_database_info.gen.go | 2 +- .../internal/dal/online_database_info.go | 2 +- .../internal/physicaltable/physical.go | 6 +- .../memory/database/internal/sheet/sheet.go | 13 +++-- .../memory/database/repository/repository.go | 12 ++-- .../memory/database/service/database.go | 2 +- .../memory/database/service/database_impl.go | 7 ++- .../database/service/database_impl_test.go | 2 +- .../variables/entity/variable_instance.go | 2 +- backend/domain/plugin/conf/load_plugin.go | 4 +- backend/domain/plugin/dto/auth.go | 4 +- backend/domain/plugin/dto/plugin.go | 4 +- backend/domain/plugin/dto/tool.go | 2 +- backend/domain/plugin/entity/plugin.go | 2 +- backend/domain/plugin/entity/tool.go | 2 +- .../plugin/internal/dal/agent_tool_version.go | 2 +- .../dal/model/agent_tool_draft.gen.go | 2 +- .../dal/model/agent_tool_version.gen.go | 2 +- .../plugin/internal/dal/model/plugin.gen.go | 2 +- .../internal/dal/model/plugin_draft.gen.go | 2 +- .../dal/model/plugin_oauth_auth.gen.go | 2 +- .../internal/dal/model/plugin_version.gen.go | 2 +- .../plugin/internal/dal/model/tool.gen.go | 2 +- .../internal/dal/model/tool_draft.gen.go | 2 +- .../internal/dal/model/tool_version.gen.go | 2 +- backend/domain/plugin/internal/dal/plugin.go | 2 +- .../plugin/internal/dal/plugin_draft.go | 2 +- .../plugin/internal/dal/plugin_version.go | 2 +- backend/domain/plugin/internal/dal/tool.go | 2 +- .../domain/plugin/internal/dal/tool_draft.go | 2 +- .../plugin/internal/dal/tool_version.go | 2 +- .../plugin/internal/encoder/req_encode.go | 2 +- .../internal/openapi/convert_protocol.go | 4 +- .../domain/plugin/repository/plugin_impl.go | 6 +- .../plugin/repository/plugin_repository.go | 2 +- backend/domain/plugin/repository/tool_impl.go | 6 +- .../plugin/repository/tool_repository.go | 2 +- backend/domain/plugin/service/agent_tool.go | 4 +- backend/domain/plugin/service/exec_tool.go | 4 +- .../domain/plugin/service/exec_tool_test.go | 2 +- backend/domain/plugin/service/plugin_auth.go | 4 +- backend/domain/plugin/service/plugin_draft.go | 10 ++-- backend/domain/plugin/service/plugin_oauth.go | 4 +- .../domain/plugin/service/plugin_online.go | 8 +-- .../domain/plugin/service/plugin_release.go | 2 +- backend/domain/plugin/service/plugin_saas.go | 4 +- backend/domain/plugin/service/service.go | 2 +- .../plugin/service/tool/invocation_args.go | 10 ++-- .../plugin/service/tool/invocation_http.go | 4 +- backend/domain/search/entity/resource_doc.go | 2 +- backend/domain/search/entity/search.go | 2 +- backend/domain/search/service/search.go | 2 +- .../domain/workflow/component_interface.go | 2 +- backend/domain/workflow/entity/vo/curd.go | 2 +- backend/domain/workflow/entity/vo/node.go | 2 +- .../workflow/entity/workflow_execution.go | 2 +- .../internal/canvas/adaptor/canvas_test.go | 18 +++--- .../internal/canvas/adaptor/to_schema.go | 2 +- .../internal/compose/designate_option.go | 2 +- .../domain/workflow/internal/compose/state.go | 4 +- .../workflow/internal/compose/workflow_run.go | 2 +- .../internal/compose/workflow_tool.go | 2 +- .../workflow/internal/execute/callback.go | 2 +- .../workflow/internal/execute/context.go | 2 +- .../workflow/internal/execute/event_handle.go | 2 +- .../workflow/internal/execute/tool_option.go | 2 +- .../conversation/clearconversationhistory.go | 4 +- .../nodes/conversation/conversationhistory.go | 6 +- .../nodes/conversation/conversationlist.go | 2 +- .../nodes/conversation/createconversation.go | 4 +- .../nodes/conversation/createmessage.go | 10 ++-- .../nodes/conversation/deleteconversation.go | 2 +- .../nodes/conversation/deletemessage.go | 4 +- .../nodes/conversation/editmessage.go | 10 ++-- .../nodes/conversation/messagelist.go | 4 +- .../nodes/conversation/updateconversation.go | 2 +- .../domain/workflow/internal/nodes/convert.go | 2 +- .../workflow/internal/nodes/database/adapt.go | 2 +- .../internal/nodes/database/common.go | 4 +- .../internal/nodes/database/customsql.go | 4 +- .../internal/nodes/database/customsql_test.go | 8 +-- .../internal/nodes/database/delete.go | 4 +- .../internal/nodes/database/insert.go | 4 +- .../workflow/internal/nodes/database/query.go | 4 +- .../internal/nodes/database/query_test.go | 8 +-- .../internal/nodes/database/update.go | 4 +- .../nodes/intentdetector/intent_detector.go | 2 +- .../internal/nodes/knowledge/adaptor.go | 2 +- .../nodes/knowledge/knowledge_deleter.go | 4 +- .../nodes/knowledge/knowledge_indexer.go | 4 +- .../nodes/knowledge/knowledge_retrieve.go | 6 +- .../domain/workflow/internal/nodes/llm/llm.go | 8 +-- .../workflow/internal/nodes/llm/plugin.go | 2 +- .../workflow/internal/nodes/plugin/exec.go | 8 +-- .../workflow/internal/nodes/plugin/plugin.go | 2 +- .../internal/nodes/receiver/input_receiver.go | 2 +- .../domain/workflow/internal/nodes/utils.go | 2 +- .../internal/repo/conversation_repository.go | 2 +- .../internal/repo/execute_history_store.go | 2 +- .../workflow/internal/repo/repository.go | 2 +- .../internal/schema/workflow_schema.go | 2 +- backend/domain/workflow/plugin/plugin.go | 10 ++-- .../domain/workflow/service/as_tool_impl.go | 2 +- .../workflow/service/conversation_impl.go | 4 +- .../workflow/service/executable_impl.go | 4 +- .../workflow/service/executable_impl_test.go | 6 +- .../domain/workflow/service/service_impl.go | 2 +- .../domain/workflow/variable/variable_impl.go | 4 +- .../mock/crossdomain/crossuser/crossuser.go | 2 +- .../internal/mock/domain/plugin/interface.go | 2 +- .../mock/domain/workflow/interface.go | 2 +- backend/types/ddl/gen_orm_query.go | 6 +- 268 files changed, 664 insertions(+), 664 deletions(-) rename backend/crossdomain/{contract/agent/single_agent.go => agent/contract.go} (90%) rename backend/crossdomain/{impl/singleagent => agent/impl}/single_agent.go (94%) rename backend/{api/model/crossdomain/singleagent => crossdomain/agent/model}/single_agent.go (94%) rename backend/crossdomain/{contract => }/agentrun/agentrunmock/agent_run_mock.go (100%) rename backend/crossdomain/{contract/agentrun/agent_run.go => agentrun/contract.go} (100%) rename backend/crossdomain/{impl/agentrun => agentrun/impl}/agent_run.go (97%) rename backend/{api/model/crossdomain/agentrun => crossdomain/agentrun/model}/agent_run.go (77%) rename backend/crossdomain/{contract/connector/connector.go => connector/contract.go} (73%) rename backend/crossdomain/{impl/connector => connector/impl}/connector.go (93%) rename backend/{api/model/crossdomain/connector => crossdomain/connector/model}/connector.go (98%) delete mode 100644 backend/crossdomain/contract/knowledge/knowledge.go rename backend/crossdomain/{contract/conversation/conversation.go => conversation/contract.go} (87%) rename backend/crossdomain/{contract => }/conversation/conversationmock/conversation_mock.go (97%) rename backend/crossdomain/{impl/conversation => conversation/impl}/conversation.go (93%) rename backend/{api/model/crossdomain/conversation => crossdomain/conversation/model}/conversation.go (98%) rename backend/crossdomain/{contract/database/database.go => database/contract.go} (94%) rename backend/crossdomain/{contract => }/database/databasemock/database_mock.go (99%) rename backend/crossdomain/{impl/database => database/impl}/database.go (99%) rename backend/{api/model/crossdomain/database => crossdomain/database/model}/const.go (99%) rename backend/{api/model/crossdomain/database => crossdomain/database/model}/database.go (99%) rename backend/crossdomain/{contract/datacopy/datacopy.go => datacopy/contract.go} (100%) rename backend/crossdomain/{impl/datacopy => datacopy/impl}/datacopy.go (97%) create mode 100644 backend/crossdomain/datacopy/model/.gitkeep create mode 100644 backend/crossdomain/knowledge/contract.go rename backend/crossdomain/{impl/knowledge => knowledge/impl}/knowledge.go (94%) rename backend/crossdomain/{contract => }/knowledge/knowledgemock/knowledge_mock.go (98%) rename backend/{api/model/crossdomain/knowledge => crossdomain/knowledge/model}/knowledge.go (99%) rename backend/crossdomain/{contract/message/message.go => message/contract.go} (80%) rename backend/crossdomain/{impl/message => message/impl}/message.go (98%) rename backend/crossdomain/{impl/message => message/impl}/message_test.go (99%) rename backend/crossdomain/{contract => }/message/messagemock/message_mock.go (98%) rename backend/{api/model/crossdomain/message => crossdomain/message/model}/message.go (99%) rename backend/crossdomain/{contract => }/plugin/consts/consts.go (100%) rename backend/crossdomain/{contract/plugin/plugin.go => plugin/contract.go} (94%) rename backend/crossdomain/{contract => }/plugin/convert/api/api.go (97%) rename backend/crossdomain/{contract => }/plugin/convert/auth.go (97%) rename backend/crossdomain/{contract => }/plugin/convert/format.go (96%) rename backend/crossdomain/{contract => }/plugin/convert/http.go (100%) rename backend/crossdomain/{contract => }/plugin/convert/param.go (97%) rename backend/crossdomain/{contract => }/plugin/convert/plugin.go (94%) rename backend/crossdomain/{impl/plugin => plugin/impl}/plugin.go (97%) rename backend/crossdomain/{contract => }/plugin/model/default.go (96%) rename backend/crossdomain/{contract => }/plugin/model/openapi.go (99%) rename backend/crossdomain/{contract => }/plugin/model/option.go (95%) rename backend/crossdomain/{contract => }/plugin/model/plugin.go (100%) rename backend/crossdomain/{contract => }/plugin/model/plugin_manifest.go (99%) rename backend/crossdomain/{contract => }/plugin/model/plugin_method.go (100%) rename backend/crossdomain/{contract => }/plugin/model/toolinfo.go (99%) rename backend/crossdomain/{contract => }/plugin/pluginmock/plugin_mock.go (98%) rename backend/crossdomain/{contract/search/search.go => search/contract.go} (92%) rename backend/crossdomain/{impl/search => search/impl}/search.go (91%) rename backend/{api/model/crossdomain/search => crossdomain/search/model}/resource_doc.go (99%) rename backend/{api/model/crossdomain/search => crossdomain/search/model}/search.go (98%) rename backend/crossdomain/{contract/upload/upload.go => upload/contract.go} (100%) rename backend/crossdomain/{impl/upload => upload/impl}/upload.go (97%) rename backend/crossdomain/{contract => }/upload/uploadmock/upload_mock.go (100%) rename backend/crossdomain/{contract/user/user.go => user/contract.go} (100%) rename backend/crossdomain/{impl/crossuser/crossuser.go => user/impl/user.go} (97%) rename backend/crossdomain/{contract/variables/varibales.go => variables/contract.go} (95%) rename backend/crossdomain/{impl/variables => variables/impl}/variables.go (95%) rename backend/{api/model/crossdomain/variables => crossdomain/variables/model}/variable_instance.go (97%) rename backend/crossdomain/{contract/workflow/workflow.go => workflow/contract.go} (98%) rename backend/crossdomain/{impl/workflow => workflow/impl}/workflow.go (96%) rename backend/{api/model/crossdomain/workflow => crossdomain/workflow/model}/workflow.go (98%) diff --git a/backend/api/handler/coze/workflow_service_test.go b/backend/api/handler/coze/workflow_service_test.go index d349498d0..d0df3be73 100644 --- a/backend/api/handler/coze/workflow_service_test.go +++ b/backend/api/handler/coze/workflow_service_test.go @@ -47,10 +47,6 @@ import ( "gorm.io/driver/mysql" "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - modelknowledge "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/playground" pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop" "github.com/coze-dev/coze-studio/backend/api/model/workflow" @@ -61,22 +57,26 @@ import ( "github.com/coze-dev/coze-studio/backend/application/user" appworkflow "github.com/coze-dev/coze-studio/backend/application/workflow" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun/agentrunmock" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation/conversationmock" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge/knowledgemock" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - message0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message/messagemock" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - pluginmodel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/pluginmock" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" - pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/plugin" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/agentrunmock" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + message0 "github.com/coze-dev/coze-studio/backend/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" + + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/conversationmock" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/databasemock" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/knowledgemock" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/message/messagemock" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/impl" + pluginmodel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/pluginmock" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" conventity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" msgentity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" @@ -2771,7 +2771,7 @@ func TestCopyWorkflowAppToLibrary(t *testing.T) { r.load("copy_to_app/child_1.json", withID(7515027150387281920), withProjectID(appIDInt64)) r.load("copy_to_app/main.json", withID(7515027091302121472), withProjectID(appIDInt64)) - defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&modelknowledge.CopyKnowledgeResponse{ + defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&knowledge.CopyKnowledgeResponse{ TargetKnowledgeID: 100100, }, nil).Build().UnPatch() @@ -2874,7 +2874,7 @@ func TestCopyWorkflowAppToLibrary(t *testing.T) { defer mockey.Mock(appworkflow.PublishWorkflowResource).To(mockPublishWorkflowResource).Build().UnPatch() - defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&modelknowledge.CopyKnowledgeResponse{ + defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&knowledge.CopyKnowledgeResponse{ TargetKnowledgeID: 100100, }, nil).Build().UnPatch() diff --git a/backend/application/app/app.go b/backend/application/app/app.go index 0cba54efb..aad8a2fb0 100644 --- a/backend/application/app/app.go +++ b/backend/application/app/app.go @@ -32,8 +32,6 @@ import ( projectAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/project" publishAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/publish" taskAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/task" - connectorModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" "github.com/coze-dev/coze-studio/backend/api/model/playground" @@ -46,7 +44,9 @@ import ( "github.com/coze-dev/coze-studio/backend/application/plugin" "github.com/coze-dev/coze-studio/backend/application/workflow" "github.com/coze-dev/coze-studio/backend/bizpkg/config" - pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + connectorModel "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/domain/app/entity" "github.com/coze-dev/coze-studio/backend/domain/app/repository" "github.com/coze-dev/coze-studio/backend/domain/app/service" diff --git a/backend/application/application.go b/backend/application/application.go index 7e2fbf0f0..8e91f1a4c 100644 --- a/backend/application/application.go +++ b/backend/application/application.go @@ -37,34 +37,34 @@ import ( "github.com/coze-dev/coze-studio/backend/application/upload" "github.com/coze-dev/coze-studio/backend/application/user" "github.com/coze-dev/coze-studio/backend/application/workflow" - crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/contract/datacopy" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search" - crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" - agentrunImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/agentrun" - connectorImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/connector" - conversationImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/conversation" - crossuserImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/crossuser" - databaseImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/database" - dataCopyImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/datacopy" - knowledgeImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/knowledge" - messageImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/message" - pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/plugin" - searchImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/search" - singleagentImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/singleagent" - uploadImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/upload" - variablesImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/variables" - workflowImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/workflow" + crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + singleagentImpl "github.com/coze-dev/coze-studio/backend/crossdomain/agent/impl" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + agentrunImpl "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/impl" + crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector" + connectorImpl "github.com/coze-dev/coze-studio/backend/crossdomain/connector/impl" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + conversationImpl "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/impl" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + databaseImpl "github.com/coze-dev/coze-studio/backend/crossdomain/database/impl" + crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy" + dataCopyImpl "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy/impl" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledgeImpl "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/impl" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + messageImpl "github.com/coze-dev/coze-studio/backend/crossdomain/message/impl" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/impl" + crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search" + searchImpl "github.com/coze-dev/coze-studio/backend/crossdomain/search/impl" + crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload" + uploadImpl "github.com/coze-dev/coze-studio/backend/crossdomain/upload/impl" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" + crossuserImpl "github.com/coze-dev/coze-studio/backend/crossdomain/user/impl" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" + variablesImpl "github.com/coze-dev/coze-studio/backend/crossdomain/variables/impl" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" + workflowImpl "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/impl" "github.com/coze-dev/coze-studio/backend/infra/checkpoint" "github.com/coze-dev/coze-studio/backend/infra/document/progressbar" progressBarImpl "github.com/coze-dev/coze-studio/backend/infra/document/progressbar/impl/progressbar" diff --git a/backend/application/conversation/agent_run.go b/backend/application/conversation/agent_run.go index 3932c3533..b8f39d0c9 100644 --- a/backend/application/conversation/agent_run.go +++ b/backend/application/conversation/agent_run.go @@ -28,9 +28,9 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" "github.com/coze-dev/coze-studio/backend/api/model/conversation/message" "github.com/coze-dev/coze-studio/backend/api/model/conversation/run" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - crossDomainMessage "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + crossDomainMessage "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" diff --git a/backend/application/conversation/message.go b/backend/application/conversation/message.go index 53dcdecd5..a1941847b 100644 --- a/backend/application/conversation/message.go +++ b/backend/application/conversation/message.go @@ -24,8 +24,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" "github.com/coze-dev/coze-studio/backend/api/model/conversation/message" "github.com/coze-dev/coze-studio/backend/api/model/conversation/run" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" singleAgentEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" diff --git a/backend/application/conversation/openapi_agent_run.go b/backend/application/conversation/openapi_agent_run.go index f8fd9b836..e14b8f119 100644 --- a/backend/application/conversation/openapi_agent_run.go +++ b/backend/application/conversation/openapi_agent_run.go @@ -29,10 +29,10 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" "github.com/coze-dev/coze-studio/backend/api/model/conversation/run" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" diff --git a/backend/application/conversation/openapi_agent_run_test.go b/backend/application/conversation/openapi_agent_run_test.go index 0249612a8..c11432cad 100644 --- a/backend/application/conversation/openapi_agent_run_test.go +++ b/backend/application/conversation/openapi_agent_run_test.go @@ -26,7 +26,7 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" "github.com/coze-dev/coze-studio/backend/api/model/conversation/run" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" openapiEntity "github.com/coze-dev/coze-studio/backend/domain/openauth/openapiauth/entity" diff --git a/backend/application/conversation/openapi_message.go b/backend/application/conversation/openapi_message.go index 036fd5057..25eb57034 100644 --- a/backend/application/conversation/openapi_message.go +++ b/backend/application/conversation/openapi_message.go @@ -23,8 +23,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/message" "github.com/coze-dev/coze-studio/backend/api/model/conversation/run" - apiMessage "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - message3 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" @@ -67,9 +67,9 @@ func (m *OpenapiMessageApplication) GetApiMessageList(ctx context.Context, mr *m AgentID: currentConversation.AgentID, Limit: int(ptr.From(mr.Limit)), - MessageType: []*message3.MessageType{ - ptr.Of(message3.MessageTypeQuestion), - ptr.Of(message3.MessageTypeAnswer), + MessageType: []*model.MessageType{ + ptr.Of(model.MessageTypeQuestion), + ptr.Of(model.MessageTypeAnswer), }, } if mr.ChatID != nil { @@ -127,7 +127,7 @@ func (m *OpenapiMessageApplication) buildMessageListResponse(ctx context.Context MetaData: dm.Ext, ReasoningContent: ptr.Of(dm.ReasoningContent), } - if dm.ContentType == message3.ContentTypeMix { + if dm.ContentType == model.ContentTypeMix { msg.ContentType = run.ContentTypeMixApi if dm.DisplayContent != "" { msg.Content = m.parseDisplayContent(ctx, dm) @@ -158,10 +158,10 @@ func (m *OpenapiMessageApplication) parseDisplayContent(ctx context.Context, dm if one == nil { continue } - switch apiMessage.InputType(one.Type) { - case apiMessage.InputTypeText: + switch model.InputType(one.Type) { + case model.InputTypeText: continue - case apiMessage.InputTypeImage, apiMessage.InputTypeFile: + case model.InputTypeImage, model.InputTypeFile: if one.GetFileID() != 0 { fileInfo, err := m.UploaodDomainSVC.GetFile(ctx, &uploadService.GetFileRequest{ ID: one.GetFileID(), diff --git a/backend/application/knowledge/convertor.go b/backend/application/knowledge/convertor.go index ffc24bfad..858c1eaf9 100644 --- a/backend/application/knowledge/convertor.go +++ b/backend/application/knowledge/convertor.go @@ -25,11 +25,9 @@ import ( "strings" "time" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" - modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" "github.com/coze-dev/coze-studio/backend/application/upload" + "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" "github.com/coze-dev/coze-studio/backend/infra/document" @@ -145,17 +143,17 @@ func convertDocTableSheet2Model(sheet entity.TableSheet) *dataset.DocTableSheet } } -func convertTableMeta(t []*entity.TableColumn) []*modelCommon.DocTableColumn { +func convertTableMeta(t []*entity.TableColumn) []*dataset.DocTableColumn { if len(t) == 0 { return nil } - resp := make([]*modelCommon.DocTableColumn, 0) + resp := make([]*dataset.DocTableColumn, 0) for i := range t { if t[i] == nil { continue } - resp = append(resp, &modelCommon.DocTableColumn{ + resp = append(resp, &dataset.DocTableColumn{ ID: t[i].ID, ColumnName: t[i].Name, IsSemantic: t[i].Indexing, @@ -167,30 +165,30 @@ func convertTableMeta(t []*entity.TableColumn) []*modelCommon.DocTableColumn { return resp } -func convertColumnType(t document.TableColumnType) *modelCommon.ColumnType { +func convertColumnType(t document.TableColumnType) *dataset.ColumnType { switch t { case document.TableColumnTypeString: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Text) + return dataset.ColumnTypePtr(dataset.ColumnType_Text) case document.TableColumnTypeBoolean: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Boolean) + return dataset.ColumnTypePtr(dataset.ColumnType_Boolean) case document.TableColumnTypeNumber: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Float) + return dataset.ColumnTypePtr(dataset.ColumnType_Float) case document.TableColumnTypeTime: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Date) + return dataset.ColumnTypePtr(dataset.ColumnType_Date) case document.TableColumnTypeInteger: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Number) + return dataset.ColumnTypePtr(dataset.ColumnType_Number) case document.TableColumnTypeImage: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Image) + return dataset.ColumnTypePtr(dataset.ColumnType_Image) default: - return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Text) + return dataset.ColumnTypePtr(dataset.ColumnType_Text) } } -func convertDocTableSheet(t *entity.TableSheet) *modelCommon.DocTableSheet { +func convertDocTableSheet(t *entity.TableSheet) *dataset.DocTableSheet { if t == nil { return nil } - return &modelCommon.DocTableSheet{ + return &dataset.DocTableSheet{ ID: t.SheetId, SheetName: t.SheetName, TotalRow: t.TotalRows, @@ -217,7 +215,7 @@ func convertSliceContent(s *entity.Slice) string { if len(s.RawContent) == 0 { return "" } - if s.RawContent[0].Type == knowledgeModel.SliceContentTypeTable { + if s.RawContent[0].Type == model.SliceContentTypeTable { tableData := make([]sliceContentData, 0, len(s.RawContent[0].Table.Columns)) for _, col := range s.RawContent[0].Table.Columns { tableData = append(tableData, sliceContentData{ @@ -240,13 +238,13 @@ type sliceContentData struct { Desc string `json:"desc"` } -func convertSliceStatus2Model(status knowledgeModel.SliceStatus) dataset.SliceStatus { +func convertSliceStatus2Model(status model.SliceStatus) dataset.SliceStatus { switch status { - case knowledgeModel.SliceStatusInit: + case model.SliceStatusInit: return dataset.SliceStatus_PendingVectoring - case knowledgeModel.SliceStatusFinishStore: + case model.SliceStatusFinishStore: return dataset.SliceStatus_FinishVectoring - case knowledgeModel.SliceStatusFailed: + case model.SliceStatusFailed: return dataset.SliceStatus_Deactive default: return dataset.SliceStatus_PendingVectoring diff --git a/backend/application/knowledge/knowledge.go b/backend/application/knowledge/knowledge.go index 659d1b563..a0e3f3731 100644 --- a/backend/application/knowledge/knowledge.go +++ b/backend/application/knowledge/knowledge.go @@ -26,13 +26,13 @@ import ( "github.com/bytedance/sonic" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" "github.com/coze-dev/coze-studio/backend/application/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" resourceEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" diff --git a/backend/application/memory/convertor.go b/backend/application/memory/convertor.go index 6b5088ffd..e424d08ca 100644 --- a/backend/application/memory/convertor.go +++ b/backend/application/memory/convertor.go @@ -22,8 +22,8 @@ import ( "strings" "github.com/coze-dev/coze-studio/backend/api/model/base" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/application/memory/database.go b/backend/application/memory/database.go index a854f154c..4b5e3a918 100644 --- a/backend/application/memory/database.go +++ b/backend/application/memory/database.go @@ -21,14 +21,14 @@ import ( "fmt" "github.com/coze-dev/coze-studio/backend/api/model/base" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" "github.com/coze-dev/coze-studio/backend/application/search" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" + model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" databaseEntity "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" diff --git a/backend/application/memory/variables.go b/backend/application/memory/variables.go index 812c865a9..a972210f0 100644 --- a/backend/application/memory/variables.go +++ b/backend/application/memory/variables.go @@ -23,10 +23,10 @@ import ( "strconv" "github.com/coze-dev/coze-studio/backend/api/model/base" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + model "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/plugin/api_management.go b/backend/application/plugin/api_management.go index 08473f7c5..fe24b8290 100644 --- a/backend/application/plugin/api_management.go +++ b/backend/application/plugin/api_management.go @@ -32,10 +32,10 @@ import ( common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/repository" diff --git a/backend/application/plugin/info.go b/backend/application/plugin/info.go index 89f000cd2..1a3634b28 100644 --- a/backend/application/plugin/info.go +++ b/backend/application/plugin/info.go @@ -30,9 +30,9 @@ import ( common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/repository" diff --git a/backend/application/plugin/lifecycle.go b/backend/application/plugin/lifecycle.go index dcd2f065e..50873d970 100644 --- a/backend/application/plugin/lifecycle.go +++ b/backend/application/plugin/lifecycle.go @@ -23,7 +23,7 @@ import ( pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" diff --git a/backend/application/plugin/playground.go b/backend/application/plugin/playground.go index ada930fe4..ca104abec 100644 --- a/backend/application/plugin/playground.go +++ b/backend/application/plugin/playground.go @@ -26,7 +26,7 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common" pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/plugin/plugin.go b/backend/application/plugin/plugin.go index bdcc79b20..59e5f91fc 100644 --- a/backend/application/plugin/plugin.go +++ b/backend/application/plugin/plugin.go @@ -30,8 +30,8 @@ import ( pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/repository" diff --git a/backend/application/plugin/plugin_test.go b/backend/application/plugin/plugin_test.go index 9e2ccd978..c32873c4d 100644 --- a/backend/application/plugin/plugin_test.go +++ b/backend/application/plugin/plugin_test.go @@ -26,8 +26,8 @@ import ( productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api" pluginCommon "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" mockPlugin "github.com/coze-dev/coze-studio/backend/internal/mock/domain/plugin" diff --git a/backend/application/plugin/registration.go b/backend/application/plugin/registration.go index a44bbb4ad..3cf4fc39d 100644 --- a/backend/application/plugin/registration.go +++ b/backend/application/plugin/registration.go @@ -30,9 +30,9 @@ import ( common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/search/project_search.go b/backend/application/search/project_search.go index 527b29873..64ae0afbd 100644 --- a/backend/application/search/project_search.go +++ b/backend/application/search/project_search.go @@ -24,11 +24,11 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence" "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common" - search2 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" "github.com/coze-dev/coze-studio/backend/api/model/marketplace/marketplace_common" "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common" "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + search2 "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" diff --git a/backend/application/search/resource_pack.go b/backend/application/search/resource_pack.go index 03e2b0bff..dade6fdbe 100644 --- a/backend/application/search/resource_pack.go +++ b/backend/application/search/resource_pack.go @@ -20,10 +20,10 @@ import ( "context" "fmt" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/api/model/workflow" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" dbservice "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/application/search/resource_search.go b/backend/application/search/resource_search.go index 81e251a58..4c0e98fac 100644 --- a/backend/application/search/resource_search.go +++ b/backend/application/search/resource_search.go @@ -23,10 +23,10 @@ import ( "strconv" "sync" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/api/model/resource" "github.com/coze-dev/coze-studio/backend/api/model/resource/common" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/search/entity" search "github.com/coze-dev/coze-studio/backend/domain/search/service" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/singleagent/create.go b/backend/application/singleagent/create.go index 8af3516cb..a8a2ab310 100644 --- a/backend/application/singleagent/create.go +++ b/backend/application/singleagent/create.go @@ -23,9 +23,9 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" "github.com/coze-dev/coze-studio/backend/bizpkg/config" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/singleagent/get.go b/backend/application/singleagent/get.go index bc3f28fc6..74505103a 100644 --- a/backend/application/singleagent/get.go +++ b/backend/application/singleagent/get.go @@ -23,15 +23,15 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/playground" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/bizpkg/config" "github.com/coze-dev/coze-studio/backend/bizpkg/config/modelmgr" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" knowledge "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/application/singleagent/publish.go b/backend/application/singleagent/publish.go index 0f0fd0393..3d6aec052 100644 --- a/backend/application/singleagent/publish.go +++ b/backend/application/singleagent/publish.go @@ -25,9 +25,9 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/playground" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" search "github.com/coze-dev/coze-studio/backend/domain/search/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/application/singleagent/single_agent.go b/backend/application/singleagent/single_agent.go index 3e16d2059..938c8c344 100644 --- a/backend/application/singleagent/single_agent.go +++ b/backend/application/singleagent/single_agent.go @@ -29,13 +29,13 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api" "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/playground" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" singleagent "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/service" variableEntity "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" diff --git a/backend/application/workflow/chatflow.go b/backend/application/workflow/chatflow.go index 609c2788b..c08207be3 100644 --- a/backend/application/workflow/chatflow.go +++ b/backend/application/workflow/chatflow.go @@ -29,14 +29,14 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" "github.com/coze-dev/coze-studio/backend/domain/upload/service" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/application/workflow/chatflow_test.go b/backend/application/workflow/chatflow_test.go index b5afe0093..2e48a53f5 100644 --- a/backend/application/workflow/chatflow_test.go +++ b/backend/application/workflow/chatflow_test.go @@ -26,12 +26,12 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - messageentity "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun/agentrunmock" - crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload/uploadmock" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/agentrunmock" + messageentity "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload" + "github.com/coze-dev/coze-studio/backend/crossdomain/upload/uploadmock" agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" uploadentity "github.com/coze-dev/coze-studio/backend/domain/upload/entity" "github.com/coze-dev/coze-studio/backend/domain/upload/service" diff --git a/backend/application/workflow/workflow.go b/backend/application/workflow/workflow.go index 31a7f0364..ff2279ad0 100644 --- a/backend/application/workflow/workflow.go +++ b/backend/application/workflow/workflow.go @@ -31,8 +31,6 @@ import ( "golang.org/x/sync/errgroup" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/playground" pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop" @@ -44,9 +42,11 @@ import ( appmemory "github.com/coze-dev/coze-studio/backend/application/memory" appplugin "github.com/coze-dev/coze-studio/backend/application/plugin" "github.com/coze-dev/coze-studio/backend/application/user" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" search "github.com/coze-dev/coze-studio/backend/domain/search/entity" domainWorkflow "github.com/coze-dev/coze-studio/backend/domain/workflow" diff --git a/backend/crossdomain/contract/agent/single_agent.go b/backend/crossdomain/agent/contract.go similarity index 90% rename from backend/crossdomain/contract/agent/single_agent.go rename to backend/crossdomain/agent/contract.go index 275591eb4..a77d5b8c4 100644 --- a/backend/crossdomain/contract/agent/single_agent.go +++ b/backend/crossdomain/agent/contract.go @@ -21,16 +21,18 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + "github.com/coze-dev/coze-studio/backend/api/model/playground" ) // Requests and responses must not reference domain entities and can only use models under api/model/crossdomain. type SingleAgent interface { StreamExecute(ctx context.Context, - agentRuntime *AgentRuntime) (*schema.StreamReader[*singleagent.AgentEvent], error) - ObtainAgentByIdentity(ctx context.Context, identity *singleagent.AgentIdentity) (*singleagent.SingleAgent, error) + agentRuntime *AgentRuntime) (*schema.StreamReader[*model.AgentEvent], error) + ObtainAgentByIdentity(ctx context.Context, identity *model.AgentIdentity) (*model.SingleAgent, error) } type AgentRuntime struct { @@ -49,9 +51,9 @@ type AgentRuntime struct { ResumeInfo *ResumeInfo } -type ResumeInfo = singleagent.InterruptInfo +type ResumeInfo = model.InterruptInfo -type AgentEvent = singleagent.AgentEvent +type AgentEvent = model.AgentEvent var defaultSVC SingleAgent diff --git a/backend/crossdomain/impl/singleagent/single_agent.go b/backend/crossdomain/agent/impl/single_agent.go similarity index 94% rename from backend/crossdomain/impl/singleagent/single_agent.go rename to backend/crossdomain/agent/impl/single_agent.go index 4e1dbdbf5..80db61de7 100644 --- a/backend/crossdomain/impl/singleagent/single_agent.go +++ b/backend/crossdomain/agent/impl/single_agent.go @@ -14,16 +14,16 @@ * limitations under the License. */ -package agent +package impl import ( "context" "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" + crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" singleagent "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/service" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" "github.com/coze-dev/coze-studio/backend/pkg/lang/slices" diff --git a/backend/api/model/crossdomain/singleagent/single_agent.go b/backend/crossdomain/agent/model/single_agent.go similarity index 94% rename from backend/api/model/crossdomain/singleagent/single_agent.go rename to backend/crossdomain/agent/model/single_agent.go index e7391368f..c1789af4a 100644 --- a/backend/api/model/crossdomain/singleagent/single_agent.go +++ b/backend/crossdomain/agent/model/single_agent.go @@ -14,16 +14,16 @@ * limitations under the License. */ -package singleagent +package model import ( "github.com/cloudwego/eino/schema" "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" ) type EventType string @@ -113,7 +113,7 @@ type ExecuteRequest struct { ResumeInfo *InterruptInfo PreCallTools []*agentrun.ToolsRetriever - CustomVariables map[string]string + CustomVariables map[string]string ConversationID int64 } diff --git a/backend/crossdomain/contract/agentrun/agentrunmock/agent_run_mock.go b/backend/crossdomain/agentrun/agentrunmock/agent_run_mock.go similarity index 100% rename from backend/crossdomain/contract/agentrun/agentrunmock/agent_run_mock.go rename to backend/crossdomain/agentrun/agentrunmock/agent_run_mock.go diff --git a/backend/crossdomain/contract/agentrun/agent_run.go b/backend/crossdomain/agentrun/contract.go similarity index 100% rename from backend/crossdomain/contract/agentrun/agent_run.go rename to backend/crossdomain/agentrun/contract.go diff --git a/backend/crossdomain/impl/agentrun/agent_run.go b/backend/crossdomain/agentrun/impl/agent_run.go similarity index 97% rename from backend/crossdomain/impl/agentrun/agent_run.go rename to backend/crossdomain/agentrun/impl/agent_run.go index 3474244da..9c02b3650 100644 --- a/backend/crossdomain/impl/agentrun/agent_run.go +++ b/backend/crossdomain/agentrun/impl/agent_run.go @@ -14,12 +14,12 @@ * limitations under the License. */ -package agentrun +package impl import ( "context" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" agentrun "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/service" ) diff --git a/backend/api/model/crossdomain/agentrun/agent_run.go b/backend/crossdomain/agentrun/model/agent_run.go similarity index 77% rename from backend/api/model/crossdomain/agentrun/agent_run.go rename to backend/crossdomain/agentrun/model/agent_run.go index e17389e29..1be00cd35 100644 --- a/backend/api/model/crossdomain/agentrun/agent_run.go +++ b/backend/crossdomain/agentrun/model/agent_run.go @@ -14,16 +14,16 @@ * limitations under the License. */ -package agentrun +package model import "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" type Tool struct { - PluginID int64 `json:"plugin_id"` - ToolID int64 `json:"tool_id"` - Arguments string `json:"arguments"` - ToolName string `json:"tool_name"` - Type ToolType `json:"type"` + PluginID int64 `json:"plugin_id"` + ToolID int64 `json:"tool_id"` + Arguments string `json:"arguments"` + ToolName string `json:"tool_name"` + Type ToolType `json:"type"` PluginFrom *bot_common.PluginFrom `json:"plugin_from"` } @@ -35,11 +35,11 @@ const ( ) type ToolsRetriever struct { - PluginID int64 - ToolName string - ToolID int64 - Arguments string - Type ToolType + PluginID int64 + ToolName string + ToolID int64 + Arguments string + Type ToolType PluginFrom *bot_common.PluginFrom `json:"plugin_from"` } diff --git a/backend/crossdomain/contract/connector/connector.go b/backend/crossdomain/connector/contract.go similarity index 73% rename from backend/crossdomain/contract/connector/connector.go rename to backend/crossdomain/connector/contract.go index 525493379..89ee2de93 100644 --- a/backend/crossdomain/contract/connector/connector.go +++ b/backend/crossdomain/connector/contract.go @@ -19,13 +19,13 @@ package connector import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" + model "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" ) type Connector interface { - List(ctx context.Context) ([]*connector.Connector, error) - GetByIDs(ctx context.Context, ids []int64) (map[int64]*connector.Connector, error) - GetByID(ctx context.Context, id int64) (*connector.Connector, error) + List(ctx context.Context) ([]*model.Connector, error) + GetByIDs(ctx context.Context, ids []int64) (map[int64]*model.Connector, error) + GetByID(ctx context.Context, id int64) (*model.Connector, error) } var defaultSVC Connector diff --git a/backend/crossdomain/impl/connector/connector.go b/backend/crossdomain/connector/impl/connector.go similarity index 93% rename from backend/crossdomain/impl/connector/connector.go rename to backend/crossdomain/connector/impl/connector.go index b8f5ffc4b..df21cdc56 100644 --- a/backend/crossdomain/impl/connector/connector.go +++ b/backend/crossdomain/connector/impl/connector.go @@ -14,13 +14,13 @@ * limitations under the License. */ -package connector +package impl import ( "context" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" - crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector" + crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector" + model "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" connector "github.com/coze-dev/coze-studio/backend/domain/connector/service" ) diff --git a/backend/api/model/crossdomain/connector/connector.go b/backend/crossdomain/connector/model/connector.go similarity index 98% rename from backend/api/model/crossdomain/connector/connector.go rename to backend/crossdomain/connector/model/connector.go index a94f8257a..ceb959195 100644 --- a/backend/api/model/crossdomain/connector/connector.go +++ b/backend/crossdomain/connector/model/connector.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package connector +package model import "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" diff --git a/backend/crossdomain/contract/knowledge/knowledge.go b/backend/crossdomain/contract/knowledge/knowledge.go deleted file mode 100644 index fb34dc521..000000000 --- a/backend/crossdomain/contract/knowledge/knowledge.go +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 knowledge - -import ( - "context" - - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" -) - -//go:generate mockgen -destination knowledgemock/knowledge_mock.go --package knowledgemock -source knowledge.go -type Knowledge interface { - ListKnowledge(ctx context.Context, request *knowledge.ListKnowledgeRequest) (response *knowledge.ListKnowledgeResponse, err error) - GetKnowledgeByID(ctx context.Context, request *knowledge.GetKnowledgeByIDRequest) (response *knowledge.GetKnowledgeByIDResponse, err error) - Retrieve(ctx context.Context, req *knowledge.RetrieveRequest) (*knowledge.RetrieveResponse, error) - DeleteKnowledge(ctx context.Context, request *knowledge.DeleteKnowledgeRequest) error - MGetKnowledgeByID(ctx context.Context, request *knowledge.MGetKnowledgeByIDRequest) (response *knowledge.MGetKnowledgeByIDResponse, err error) - Store(ctx context.Context, document *knowledge.CreateDocumentRequest) (*knowledge.CreateDocumentResponse, error) - Delete(ctx context.Context, r *knowledge.DeleteDocumentRequest) (*knowledge.DeleteDocumentResponse, error) - ListKnowledgeDetail(ctx context.Context, req *knowledge.ListKnowledgeDetailRequest) (*knowledge.ListKnowledgeDetailResponse, error) -} - -var defaultSVC Knowledge - -func DefaultSVC() Knowledge { - return defaultSVC -} - -func SetDefaultSVC(c Knowledge) { - defaultSVC = c -} diff --git a/backend/crossdomain/contract/conversation/conversation.go b/backend/crossdomain/conversation/contract.go similarity index 87% rename from backend/crossdomain/contract/conversation/conversation.go rename to backend/crossdomain/conversation/contract.go index 71ed0c734..674954edf 100644 --- a/backend/crossdomain/contract/conversation/conversation.go +++ b/backend/crossdomain/conversation/contract.go @@ -19,13 +19,13 @@ package conversation import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" + model "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" ) //go:generate mockgen -destination conversationmock/conversation_mock.go --package conversationmock -source conversation.go type Conversation interface { - GetCurrentConversation(ctx context.Context, req *conversation.GetCurrent) (*conversation.Conversation, error) + GetCurrentConversation(ctx context.Context, req *model.GetCurrent) (*model.Conversation, error) CreateConversation(ctx context.Context, req *entity.CreateMeta) (*entity.Conversation, error) ClearConversationHistory(ctx context.Context, req *ClearConversationHistoryReq) (*entity.NewConversationCtxResponse, error) GetByID(ctx context.Context, id int64) (*entity.Conversation, error) diff --git a/backend/crossdomain/contract/conversation/conversationmock/conversation_mock.go b/backend/crossdomain/conversation/conversationmock/conversation_mock.go similarity index 97% rename from backend/crossdomain/contract/conversation/conversationmock/conversation_mock.go rename to backend/crossdomain/conversation/conversationmock/conversation_mock.go index 285330175..11bd3ffd4 100644 --- a/backend/crossdomain/contract/conversation/conversationmock/conversation_mock.go +++ b/backend/crossdomain/conversation/conversationmock/conversation_mock.go @@ -29,8 +29,8 @@ import ( context "context" reflect "reflect" - conversation "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" - conversation0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + conversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" + conversation0 "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" entity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" gomock "go.uber.org/mock/gomock" ) diff --git a/backend/crossdomain/impl/conversation/conversation.go b/backend/crossdomain/conversation/impl/conversation.go similarity index 93% rename from backend/crossdomain/impl/conversation/conversation.go rename to backend/crossdomain/conversation/impl/conversation.go index 44cd51b39..040e855b7 100644 --- a/backend/crossdomain/impl/conversation/conversation.go +++ b/backend/crossdomain/conversation/impl/conversation.go @@ -14,13 +14,13 @@ * limitations under the License. */ -package conversation +package impl import ( "context" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + model "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" conversation "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/service" ) diff --git a/backend/api/model/crossdomain/conversation/conversation.go b/backend/crossdomain/conversation/model/conversation.go similarity index 98% rename from backend/api/model/crossdomain/conversation/conversation.go rename to backend/crossdomain/conversation/model/conversation.go index 6f6af5efd..b515c1aad 100644 --- a/backend/api/model/crossdomain/conversation/conversation.go +++ b/backend/crossdomain/conversation/model/conversation.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package conversation +package model import "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" diff --git a/backend/crossdomain/contract/database/database.go b/backend/crossdomain/database/contract.go similarity index 94% rename from backend/crossdomain/contract/database/database.go rename to backend/crossdomain/database/contract.go index 3bb5e152f..65deeaee3 100644 --- a/backend/crossdomain/contract/database/database.go +++ b/backend/crossdomain/database/contract.go @@ -19,10 +19,10 @@ package database import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" ) -//go:generate mockgen -destination databasemock/database_mock.go --package databasemock -source database.go +//go:generate mockgen -destination databasemock/database_mock.go --package databasemock -source model.go type Database interface { ExecuteSQL(ctx context.Context, req *database.ExecuteSQLRequest) (*database.ExecuteSQLResponse, error) PublishDatabase(ctx context.Context, req *database.PublishDatabaseRequest) (resp *database.PublishDatabaseResponse, err error) diff --git a/backend/crossdomain/contract/database/databasemock/database_mock.go b/backend/crossdomain/database/databasemock/database_mock.go similarity index 99% rename from backend/crossdomain/contract/database/databasemock/database_mock.go rename to backend/crossdomain/database/databasemock/database_mock.go index 5fabf9697..b2c16a675 100644 --- a/backend/crossdomain/contract/database/databasemock/database_mock.go +++ b/backend/crossdomain/database/databasemock/database_mock.go @@ -13,7 +13,7 @@ import ( context "context" reflect "reflect" - database "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" gomock "go.uber.org/mock/gomock" ) diff --git a/backend/crossdomain/impl/database/database.go b/backend/crossdomain/database/impl/database.go similarity index 99% rename from backend/crossdomain/impl/database/database.go rename to backend/crossdomain/database/impl/database.go index 506dedac3..d80882576 100644 --- a/backend/crossdomain/impl/database/database.go +++ b/backend/crossdomain/database/impl/database.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package database +package impl import ( "context" @@ -23,10 +23,10 @@ import ( "github.com/spf13/cast" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" diff --git a/backend/api/model/crossdomain/database/const.go b/backend/crossdomain/database/model/const.go similarity index 99% rename from backend/api/model/crossdomain/database/const.go rename to backend/crossdomain/database/model/const.go index 5bf26f3ff..bc8d0d721 100644 --- a/backend/api/model/crossdomain/database/const.go +++ b/backend/crossdomain/database/model/const.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package database +package model type OperateType int64 diff --git a/backend/api/model/crossdomain/database/database.go b/backend/crossdomain/database/model/database.go similarity index 99% rename from backend/api/model/crossdomain/database/database.go rename to backend/crossdomain/database/model/database.go index c7443c0f9..0dc796501 100644 --- a/backend/api/model/crossdomain/database/database.go +++ b/backend/crossdomain/database/model/database.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package database +package model import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" diff --git a/backend/crossdomain/contract/datacopy/datacopy.go b/backend/crossdomain/datacopy/contract.go similarity index 100% rename from backend/crossdomain/contract/datacopy/datacopy.go rename to backend/crossdomain/datacopy/contract.go diff --git a/backend/crossdomain/impl/datacopy/datacopy.go b/backend/crossdomain/datacopy/impl/datacopy.go similarity index 97% rename from backend/crossdomain/impl/datacopy/datacopy.go rename to backend/crossdomain/datacopy/impl/datacopy.go index b8548153d..87d973817 100644 --- a/backend/crossdomain/impl/datacopy/datacopy.go +++ b/backend/crossdomain/datacopy/impl/datacopy.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package datacopy +package impl import ( "context" @@ -22,7 +22,7 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/application/base/appinfra" - crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/contract/datacopy" + crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy" "github.com/coze-dev/coze-studio/backend/domain/datacopy" "github.com/coze-dev/coze-studio/backend/domain/datacopy/service" ) diff --git a/backend/crossdomain/datacopy/model/.gitkeep b/backend/crossdomain/datacopy/model/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/backend/crossdomain/knowledge/contract.go b/backend/crossdomain/knowledge/contract.go new file mode 100644 index 000000000..f1691d595 --- /dev/null +++ b/backend/crossdomain/knowledge/contract.go @@ -0,0 +1,45 @@ +/* + * 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 knowledge + +import ( + "context" + + "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" +) + +//go:generate mockgen -destination knowledgemock/knowledge_mock.go --package knowledgemock -source model.go +type Knowledge interface { + ListKnowledge(ctx context.Context, request *model.ListKnowledgeRequest) (response *model.ListKnowledgeResponse, err error) + GetKnowledgeByID(ctx context.Context, request *model.GetKnowledgeByIDRequest) (response *model.GetKnowledgeByIDResponse, err error) + Retrieve(ctx context.Context, req *model.RetrieveRequest) (*model.RetrieveResponse, error) + DeleteKnowledge(ctx context.Context, request *model.DeleteKnowledgeRequest) error + MGetKnowledgeByID(ctx context.Context, request *model.MGetKnowledgeByIDRequest) (response *model.MGetKnowledgeByIDResponse, err error) + Store(ctx context.Context, document *model.CreateDocumentRequest) (*model.CreateDocumentResponse, error) + Delete(ctx context.Context, r *model.DeleteDocumentRequest) (*model.DeleteDocumentResponse, error) + ListKnowledgeDetail(ctx context.Context, req *model.ListKnowledgeDetailRequest) (*model.ListKnowledgeDetailResponse, error) +} + +var defaultSVC Knowledge + +func DefaultSVC() Knowledge { + return defaultSVC +} + +func SetDefaultSVC(c Knowledge) { + defaultSVC = c +} diff --git a/backend/crossdomain/impl/knowledge/knowledge.go b/backend/crossdomain/knowledge/impl/knowledge.go similarity index 94% rename from backend/crossdomain/impl/knowledge/knowledge.go rename to backend/crossdomain/knowledge/impl/knowledge.go index c873f796b..bb05ffb19 100644 --- a/backend/crossdomain/impl/knowledge/knowledge.go +++ b/backend/crossdomain/knowledge/impl/knowledge.go @@ -14,17 +14,16 @@ * limitations under the License. */ -package knowledge +package impl import ( "context" "errors" "fmt" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" "github.com/coze-dev/coze-studio/backend/infra/document/parser" @@ -99,11 +98,11 @@ func (i *impl) Store(ctx context.Context, document *model.CreateDocumentRequest) cs.Overlap = document.ChunkingStrategy.Overlap req := &entity.Document{ - Info: knowledge.Info{ + Info: model.Info{ Name: document.FileName, }, KnowledgeID: document.KnowledgeID, - Type: knowledge.DocumentTypeText, + Type: model.DocumentTypeText, URL: document.FileURL, Source: entity.DocumentSourceLocal, ParsingStrategy: ps, @@ -168,7 +167,7 @@ func (i *impl) ListKnowledgeDetail(ctx context.Context, req *model.ListKnowledge } resp := &model.ListKnowledgeDetailResponse{ - KnowledgeDetails: slices.Transform(response.Knowledge, func(a *knowledge.Knowledge) *model.KnowledgeDetail { + KnowledgeDetails: slices.Transform(response.Knowledge, func(a *model.Knowledge) *model.KnowledgeDetail { return &model.KnowledgeDetail{ ID: a.ID, Name: a.Name, diff --git a/backend/crossdomain/contract/knowledge/knowledgemock/knowledge_mock.go b/backend/crossdomain/knowledge/knowledgemock/knowledge_mock.go similarity index 98% rename from backend/crossdomain/contract/knowledge/knowledgemock/knowledge_mock.go rename to backend/crossdomain/knowledge/knowledgemock/knowledge_mock.go index 0f5ece7e8..5644c0050 100644 --- a/backend/crossdomain/contract/knowledge/knowledgemock/knowledge_mock.go +++ b/backend/crossdomain/knowledge/knowledgemock/knowledge_mock.go @@ -13,7 +13,7 @@ import ( context "context" reflect "reflect" - knowledge "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" gomock "go.uber.org/mock/gomock" ) diff --git a/backend/api/model/crossdomain/knowledge/knowledge.go b/backend/crossdomain/knowledge/model/knowledge.go similarity index 99% rename from backend/api/model/crossdomain/knowledge/knowledge.go rename to backend/crossdomain/knowledge/model/knowledge.go index af8d03467..6cd777561 100644 --- a/backend/api/model/crossdomain/knowledge/knowledge.go +++ b/backend/crossdomain/knowledge/model/knowledge.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package knowledge +package model import ( "github.com/bytedance/sonic" diff --git a/backend/crossdomain/contract/message/message.go b/backend/crossdomain/message/contract.go similarity index 80% rename from backend/crossdomain/contract/message/message.go rename to backend/crossdomain/message/contract.go index b6d425c1a..f5d553293 100644 --- a/backend/crossdomain/contract/message/message.go +++ b/backend/crossdomain/message/contract.go @@ -21,19 +21,19 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" ) //go:generate mockgen -destination messagemock/message_mock.go --package messagemock -source message.go type Message interface { - GetByRunIDs(ctx context.Context, conversationID int64, runIDs []int64) ([]*message.Message, error) - PreCreate(ctx context.Context, msg *message.Message) (*message.Message, error) - Create(ctx context.Context, msg *message.Message) (*message.Message, error) - BatchCreate(ctx context.Context, msg []*message.Message) ([]*message.Message, error) + GetByRunIDs(ctx context.Context, conversationID int64, runIDs []int64) ([]*model.Message, error) + PreCreate(ctx context.Context, msg *model.Message) (*model.Message, error) + Create(ctx context.Context, msg *model.Message) (*model.Message, error) + BatchCreate(ctx context.Context, msg []*model.Message) ([]*model.Message, error) List(ctx context.Context, meta *entity.ListMeta) (*entity.ListResult, error) ListWithoutPair(ctx context.Context, req *entity.ListMeta) (*entity.ListResult, error) - Edit(ctx context.Context, msg *message.Message) (*message.Message, error) + Edit(ctx context.Context, msg *model.Message) (*model.Message, error) Delete(ctx context.Context, req *entity.DeleteMeta) error GetMessageByID(ctx context.Context, id int64) (*entity.Message, error) MessageList(ctx context.Context, req *MessageListRequest) (*MessageListResponse, error) @@ -43,7 +43,7 @@ type Message interface { var defaultSVC Message -type MessageMeta = message.Message +type MessageMeta = model.Message func DefaultSVC() Message { return defaultSVC @@ -71,10 +71,10 @@ type MessageListResponse struct { } type Content struct { - Type message.InputType `json:"type"` - Text *string `json:"text,omitempty"` - Uri *string `json:"uri,omitempty"` - Url *string `json:"url,omitempty"` + Type model.InputType `json:"type"` + Text *string `json:"text,omitempty"` + Uri *string `json:"uri,omitempty"` + Url *string `json:"url,omitempty"` } type WfMessage struct { diff --git a/backend/crossdomain/impl/message/message.go b/backend/crossdomain/message/impl/message.go similarity index 98% rename from backend/crossdomain/impl/message/message.go rename to backend/crossdomain/message/impl/message.go index 935ac9576..9094bb7e0 100644 --- a/backend/crossdomain/impl/message/message.go +++ b/backend/crossdomain/message/impl/message.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package message +package impl import ( "context" @@ -23,9 +23,9 @@ import ( "github.com/cloudwego/eino/schema" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow" diff --git a/backend/crossdomain/impl/message/message_test.go b/backend/crossdomain/message/impl/message_test.go similarity index 99% rename from backend/crossdomain/impl/message/message_test.go rename to backend/crossdomain/message/impl/message_test.go index cd2318225..569b9e1fb 100644 --- a/backend/crossdomain/impl/message/message_test.go +++ b/backend/crossdomain/message/impl/message_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package message +package impl import ( "context" @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/infra/storage" diff --git a/backend/crossdomain/contract/message/messagemock/message_mock.go b/backend/crossdomain/message/messagemock/message_mock.go similarity index 98% rename from backend/crossdomain/contract/message/messagemock/message_mock.go rename to backend/crossdomain/message/messagemock/message_mock.go index 49570270a..ac8a17b7e 100644 --- a/backend/crossdomain/contract/message/messagemock/message_mock.go +++ b/backend/crossdomain/message/messagemock/message_mock.go @@ -29,8 +29,8 @@ import ( context "context" reflect "reflect" - message "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - message0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + message0 "github.com/coze-dev/coze-studio/backend/crossdomain/message" entity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" gomock "go.uber.org/mock/gomock" ) diff --git a/backend/api/model/crossdomain/message/message.go b/backend/crossdomain/message/model/message.go similarity index 99% rename from backend/api/model/crossdomain/message/message.go rename to backend/crossdomain/message/model/message.go index e516a67ed..e1a739810 100644 --- a/backend/api/model/crossdomain/message/message.go +++ b/backend/crossdomain/message/model/message.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package message +package model import ( "github.com/cloudwego/eino/schema" diff --git a/backend/crossdomain/contract/plugin/consts/consts.go b/backend/crossdomain/plugin/consts/consts.go similarity index 100% rename from backend/crossdomain/contract/plugin/consts/consts.go rename to backend/crossdomain/plugin/consts/consts.go diff --git a/backend/crossdomain/contract/plugin/plugin.go b/backend/crossdomain/plugin/contract.go similarity index 94% rename from backend/crossdomain/contract/plugin/plugin.go rename to backend/crossdomain/plugin/contract.go index bfde11973..941e30593 100644 --- a/backend/crossdomain/contract/plugin/plugin.go +++ b/backend/crossdomain/plugin/contract.go @@ -21,8 +21,8 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - model "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + model "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + workflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" ) diff --git a/backend/crossdomain/contract/plugin/convert/api/api.go b/backend/crossdomain/plugin/convert/api/api.go similarity index 97% rename from backend/crossdomain/contract/plugin/convert/api/api.go rename to backend/crossdomain/plugin/convert/api/api.go index 1e2d0fbc1..51f4549a8 100644 --- a/backend/crossdomain/contract/plugin/convert/api/api.go +++ b/backend/crossdomain/plugin/convert/api/api.go @@ -23,9 +23,9 @@ import ( "github.com/getkin/kin-openapi/openapi3" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/types/errno" ) diff --git a/backend/crossdomain/contract/plugin/convert/auth.go b/backend/crossdomain/plugin/convert/auth.go similarity index 97% rename from backend/crossdomain/contract/plugin/convert/auth.go rename to backend/crossdomain/plugin/convert/auth.go index b57eb5830..30ba3e166 100644 --- a/backend/crossdomain/contract/plugin/convert/auth.go +++ b/backend/crossdomain/plugin/convert/auth.go @@ -18,7 +18,7 @@ package convert import ( "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" ) var authTypes = map[common.AuthorizationType]consts.AuthzType{ diff --git a/backend/crossdomain/contract/plugin/convert/format.go b/backend/crossdomain/plugin/convert/format.go similarity index 96% rename from backend/crossdomain/contract/plugin/convert/format.go rename to backend/crossdomain/plugin/convert/format.go index 41483613b..11ff70393 100644 --- a/backend/crossdomain/contract/plugin/convert/format.go +++ b/backend/crossdomain/plugin/convert/format.go @@ -18,7 +18,7 @@ package convert import ( "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" ) var assistTypeToFormat = map[consts.APIFileAssistType]string{ diff --git a/backend/crossdomain/contract/plugin/convert/http.go b/backend/crossdomain/plugin/convert/http.go similarity index 100% rename from backend/crossdomain/contract/plugin/convert/http.go rename to backend/crossdomain/plugin/convert/http.go diff --git a/backend/crossdomain/contract/plugin/convert/param.go b/backend/crossdomain/plugin/convert/param.go similarity index 97% rename from backend/crossdomain/contract/plugin/convert/param.go rename to backend/crossdomain/plugin/convert/param.go index fedc39dc0..1e197a952 100644 --- a/backend/crossdomain/contract/plugin/convert/param.go +++ b/backend/crossdomain/plugin/convert/param.go @@ -20,7 +20,7 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" ) var httpParamLocations = map[common.ParameterLocation]consts.HTTPParamLocation{ diff --git a/backend/crossdomain/contract/plugin/convert/plugin.go b/backend/crossdomain/plugin/convert/plugin.go similarity index 94% rename from backend/crossdomain/contract/plugin/convert/plugin.go rename to backend/crossdomain/plugin/convert/plugin.go index 76d2556fa..d5810572b 100644 --- a/backend/crossdomain/contract/plugin/convert/plugin.go +++ b/backend/crossdomain/plugin/convert/plugin.go @@ -18,7 +18,7 @@ package convert import ( "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" ) var pluginTypes = map[common.PluginType]consts.PluginType{ diff --git a/backend/crossdomain/impl/plugin/plugin.go b/backend/crossdomain/plugin/impl/plugin.go similarity index 97% rename from backend/crossdomain/impl/plugin/plugin.go rename to backend/crossdomain/plugin/impl/plugin.go index ee37bbdfb..39f82d409 100644 --- a/backend/crossdomain/impl/plugin/plugin.go +++ b/backend/crossdomain/plugin/impl/plugin.go @@ -14,13 +14,13 @@ * limitations under the License. */ -package plugin +package impl import ( "context" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" plugin "github.com/coze-dev/coze-studio/backend/domain/plugin/service" "github.com/coze-dev/coze-studio/backend/infra/storage" diff --git a/backend/crossdomain/contract/plugin/model/default.go b/backend/crossdomain/plugin/model/default.go similarity index 96% rename from backend/crossdomain/contract/plugin/model/default.go rename to backend/crossdomain/plugin/model/default.go index 0da0bf81e..32851670a 100644 --- a/backend/crossdomain/contract/plugin/model/default.go +++ b/backend/crossdomain/plugin/model/default.go @@ -23,7 +23,7 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" ) diff --git a/backend/crossdomain/contract/plugin/model/openapi.go b/backend/crossdomain/plugin/model/openapi.go similarity index 99% rename from backend/crossdomain/contract/plugin/model/openapi.go rename to backend/crossdomain/plugin/model/openapi.go index 20c314d2a..30f13ce64 100644 --- a/backend/crossdomain/contract/plugin/model/openapi.go +++ b/backend/crossdomain/plugin/model/openapi.go @@ -26,7 +26,7 @@ import ( "github.com/cloudwego/eino/schema" "github.com/getkin/kin-openapi/openapi3" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "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" diff --git a/backend/crossdomain/contract/plugin/model/option.go b/backend/crossdomain/plugin/model/option.go similarity index 95% rename from backend/crossdomain/contract/plugin/model/option.go rename to backend/crossdomain/plugin/model/option.go index 2d031c4a4..2eca3ff0a 100644 --- a/backend/crossdomain/contract/plugin/model/option.go +++ b/backend/crossdomain/plugin/model/option.go @@ -16,7 +16,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" type ExecuteToolOption struct { ProjectInfo *ProjectInfo diff --git a/backend/crossdomain/contract/plugin/model/plugin.go b/backend/crossdomain/plugin/model/plugin.go similarity index 100% rename from backend/crossdomain/contract/plugin/model/plugin.go rename to backend/crossdomain/plugin/model/plugin.go diff --git a/backend/crossdomain/contract/plugin/model/plugin_manifest.go b/backend/crossdomain/plugin/model/plugin_manifest.go similarity index 99% rename from backend/crossdomain/contract/plugin/model/plugin_manifest.go rename to backend/crossdomain/plugin/model/plugin_manifest.go index b45f4f56a..9ee25da09 100644 --- a/backend/crossdomain/contract/plugin/model/plugin_manifest.go +++ b/backend/crossdomain/plugin/model/plugin_manifest.go @@ -23,7 +23,7 @@ import ( "strings" api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/domain/plugin/encrypt" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/types/errno" diff --git a/backend/crossdomain/contract/plugin/model/plugin_method.go b/backend/crossdomain/plugin/model/plugin_method.go similarity index 100% rename from backend/crossdomain/contract/plugin/model/plugin_method.go rename to backend/crossdomain/plugin/model/plugin_method.go diff --git a/backend/crossdomain/contract/plugin/model/toolinfo.go b/backend/crossdomain/plugin/model/toolinfo.go similarity index 99% rename from backend/crossdomain/contract/plugin/model/toolinfo.go rename to backend/crossdomain/plugin/model/toolinfo.go index 61d514d1a..eb60aeb90 100644 --- a/backend/crossdomain/contract/plugin/model/toolinfo.go +++ b/backend/crossdomain/plugin/model/toolinfo.go @@ -28,8 +28,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" "github.com/coze-dev/coze-studio/backend/pkg/lang/slices" ) diff --git a/backend/crossdomain/contract/plugin/pluginmock/plugin_mock.go b/backend/crossdomain/plugin/pluginmock/plugin_mock.go similarity index 98% rename from backend/crossdomain/contract/plugin/pluginmock/plugin_mock.go rename to backend/crossdomain/plugin/pluginmock/plugin_mock.go index 18573c127..70875887d 100644 --- a/backend/crossdomain/contract/plugin/pluginmock/plugin_mock.go +++ b/backend/crossdomain/plugin/pluginmock/plugin_mock.go @@ -30,8 +30,8 @@ import ( reflect "reflect" schema "github.com/cloudwego/eino/schema" - workflow "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - model "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + workflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" + model "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" entity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" gomock "go.uber.org/mock/gomock" ) diff --git a/backend/crossdomain/contract/search/search.go b/backend/crossdomain/search/contract.go similarity index 92% rename from backend/crossdomain/contract/search/search.go rename to backend/crossdomain/search/contract.go index 562fcfe74..104dbe2b0 100644 --- a/backend/crossdomain/contract/search/search.go +++ b/backend/crossdomain/search/contract.go @@ -19,7 +19,7 @@ package search import ( "context" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" ) type Search interface { diff --git a/backend/crossdomain/impl/search/search.go b/backend/crossdomain/search/impl/search.go similarity index 91% rename from backend/crossdomain/impl/search/search.go rename to backend/crossdomain/search/impl/search.go index 9ef10880d..c48eda3ea 100644 --- a/backend/crossdomain/impl/search/search.go +++ b/backend/crossdomain/search/impl/search.go @@ -14,13 +14,13 @@ * limitations under the License. */ -package search +package impl import ( "context" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" - crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search" + crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" "github.com/coze-dev/coze-studio/backend/domain/search/service" ) diff --git a/backend/api/model/crossdomain/search/resource_doc.go b/backend/crossdomain/search/model/resource_doc.go similarity index 99% rename from backend/api/model/crossdomain/search/resource_doc.go rename to backend/crossdomain/search/model/resource_doc.go index 0c6c42494..a3807e4de 100644 --- a/backend/api/model/crossdomain/search/resource_doc.go +++ b/backend/crossdomain/search/model/resource_doc.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package search +package model import ( resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common" diff --git a/backend/api/model/crossdomain/search/search.go b/backend/crossdomain/search/model/search.go similarity index 98% rename from backend/api/model/crossdomain/search/search.go rename to backend/crossdomain/search/model/search.go index 9d54f4a15..47e569e0c 100644 --- a/backend/api/model/crossdomain/search/search.go +++ b/backend/crossdomain/search/model/search.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package search +package model import ( resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common" diff --git a/backend/crossdomain/contract/upload/upload.go b/backend/crossdomain/upload/contract.go similarity index 100% rename from backend/crossdomain/contract/upload/upload.go rename to backend/crossdomain/upload/contract.go diff --git a/backend/crossdomain/impl/upload/upload.go b/backend/crossdomain/upload/impl/upload.go similarity index 97% rename from backend/crossdomain/impl/upload/upload.go rename to backend/crossdomain/upload/impl/upload.go index 345bebc35..43bf4d4d6 100644 --- a/backend/crossdomain/impl/upload/upload.go +++ b/backend/crossdomain/upload/impl/upload.go @@ -14,12 +14,12 @@ * limitations under the License. */ -package upload +package impl import ( "context" - crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload" + crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload" "github.com/coze-dev/coze-studio/backend/domain/upload/service" ) diff --git a/backend/crossdomain/contract/upload/uploadmock/upload_mock.go b/backend/crossdomain/upload/uploadmock/upload_mock.go similarity index 100% rename from backend/crossdomain/contract/upload/uploadmock/upload_mock.go rename to backend/crossdomain/upload/uploadmock/upload_mock.go diff --git a/backend/crossdomain/contract/user/user.go b/backend/crossdomain/user/contract.go similarity index 100% rename from backend/crossdomain/contract/user/user.go rename to backend/crossdomain/user/contract.go diff --git a/backend/crossdomain/impl/crossuser/crossuser.go b/backend/crossdomain/user/impl/user.go similarity index 97% rename from backend/crossdomain/impl/crossuser/crossuser.go rename to backend/crossdomain/user/impl/user.go index 2a07a10bd..a18be4dfc 100644 --- a/backend/crossdomain/impl/crossuser/crossuser.go +++ b/backend/crossdomain/user/impl/user.go @@ -14,12 +14,12 @@ * limitations under the License. */ -package crossuser +package impl import ( "context" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" "github.com/coze-dev/coze-studio/backend/domain/user/entity" "github.com/coze-dev/coze-studio/backend/domain/user/service" ) diff --git a/backend/crossdomain/contract/variables/varibales.go b/backend/crossdomain/variables/contract.go similarity index 95% rename from backend/crossdomain/contract/variables/varibales.go rename to backend/crossdomain/variables/contract.go index 9c9eccf32..0a53ca733 100644 --- a/backend/crossdomain/contract/variables/varibales.go +++ b/backend/crossdomain/variables/contract.go @@ -19,9 +19,9 @@ package variables import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" + variables "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" ) diff --git a/backend/crossdomain/impl/variables/variables.go b/backend/crossdomain/variables/impl/variables.go similarity index 95% rename from backend/crossdomain/impl/variables/variables.go rename to backend/crossdomain/variables/impl/variables.go index 939748258..a90d0d850 100644 --- a/backend/crossdomain/impl/variables/variables.go +++ b/backend/crossdomain/variables/impl/variables.go @@ -14,15 +14,15 @@ * limitations under the License. */ -package variables +package impl import ( "context" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" + model "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service" ) diff --git a/backend/api/model/crossdomain/variables/variable_instance.go b/backend/crossdomain/variables/model/variable_instance.go similarity index 97% rename from backend/api/model/crossdomain/variables/variable_instance.go rename to backend/crossdomain/variables/model/variable_instance.go index d0f8919c6..708154bee 100644 --- a/backend/api/model/crossdomain/variables/variable_instance.go +++ b/backend/crossdomain/variables/model/variable_instance.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package variables +package model import ( "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" diff --git a/backend/crossdomain/contract/workflow/workflow.go b/backend/crossdomain/workflow/contract.go similarity index 98% rename from backend/crossdomain/contract/workflow/workflow.go rename to backend/crossdomain/workflow/contract.go index 18bbf173a..ee5b49853 100644 --- a/backend/crossdomain/contract/workflow/workflow.go +++ b/backend/crossdomain/workflow/contract.go @@ -23,7 +23,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" workflowEntity "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/crossdomain/impl/workflow/workflow.go b/backend/crossdomain/workflow/impl/workflow.go similarity index 96% rename from backend/crossdomain/impl/workflow/workflow.go rename to backend/crossdomain/workflow/impl/workflow.go index daaa826c7..8121fea30 100644 --- a/backend/crossdomain/impl/workflow/workflow.go +++ b/backend/crossdomain/workflow/impl/workflow.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package workflow +package impl import ( "context" @@ -23,8 +23,8 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" workflowEntity "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/api/model/crossdomain/workflow/workflow.go b/backend/crossdomain/workflow/model/workflow.go similarity index 98% rename from backend/api/model/crossdomain/workflow/workflow.go rename to backend/crossdomain/workflow/model/workflow.go index 5eac9b6ec..9d63bb631 100644 --- a/backend/api/model/crossdomain/workflow/workflow.go +++ b/backend/crossdomain/workflow/model/workflow.go @@ -14,13 +14,13 @@ * limitations under the License. */ -package workflow +package model import ( "github.com/cloudwego/eino/schema" "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" ) type Locator uint8 diff --git a/backend/domain/agent/singleagent/entity/agent_event.go b/backend/domain/agent/singleagent/entity/agent_event.go index 9c774c901..a87e372ff 100644 --- a/backend/domain/agent/singleagent/entity/agent_event.go +++ b/backend/domain/agent/singleagent/entity/agent_event.go @@ -16,8 +16,8 @@ package entity -import "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" +import model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" -type AgentEvent = singleagent.AgentEvent +type AgentEvent = model.AgentEvent -type InterruptEventType = singleagent.InterruptEventType +type InterruptEventType = model.InterruptEventType diff --git a/backend/domain/agent/singleagent/entity/single_agent.go b/backend/domain/agent/singleagent/entity/single_agent.go index 3271bcd5f..ee1827693 100644 --- a/backend/domain/agent/singleagent/entity/single_agent.go +++ b/backend/domain/agent/singleagent/entity/single_agent.go @@ -17,17 +17,19 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" ) // Use composition instead of aliasing for domain entities to enhance extensibility type SingleAgent struct { - *singleagent.SingleAgent + *model.SingleAgent } -type AgentIdentity = singleagent.AgentIdentity +type AgentIdentity = model.AgentIdentity -type ExecuteRequest = singleagent.ExecuteRequest +type ExecuteRequest = model.ExecuteRequest + +type InterruptInfo = model.InterruptInfo type DuplicateInfo struct { UserID int64 diff --git a/backend/domain/agent/singleagent/internal/agentflow/agent_flow_runner.go b/backend/domain/agent/singleagent/internal/agentflow/agent_flow_runner.go index 5ae64c77d..bc65d8728 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/agent_flow_runner.go +++ b/backend/domain/agent/singleagent/internal/agentflow/agent_flow_runner.go @@ -26,10 +26,10 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" "github.com/coze-dev/coze-studio/backend/bizpkg/config/modelmgr" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/agent/singleagent/internal/agentflow/callback_reply_chunk.go b/backend/domain/agent/singleagent/internal/agentflow/callback_reply_chunk.go index 575bf7077..a6ba02097 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/callback_reply_chunk.go +++ b/backend/domain/agent/singleagent/internal/agentflow/callback_reply_chunk.go @@ -29,10 +29,10 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - plugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + plugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_retriever.go b/backend/domain/agent/singleagent/internal/agentflow/node_retriever.go index 93fbae2ac..cc8f2f74a 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_retriever.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_retriever.go @@ -25,8 +25,8 @@ import ( "github.com/cloudwego/eino/schema" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" knowledgeEntity "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/service" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_database.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_database.go index f65cbdd4a..eb7aabca0 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_database.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_database.go @@ -31,9 +31,9 @@ import ( "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/service" "github.com/coze-dev/coze-studio/backend/infra/sqlparser" "github.com/coze-dev/coze-studio/backend/pkg/lang/slices" diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_knowledge.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_knowledge.go index f1b78e4ac..9b6cf62d5 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_knowledge.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_knowledge.go @@ -28,7 +28,7 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" knowledgeEntity "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" ) diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_plugin.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_plugin.go index e297d2be6..fd2cf135d 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_plugin.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_plugin.go @@ -24,9 +24,9 @@ import ( "github.com/cloudwego/eino/schema" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_pre_retriever.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_pre_retriever.go index 1f023d0eb..4a90dcaab 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_pre_retriever.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_pre_retriever.go @@ -23,12 +23,12 @@ import ( "github.com/cloudwego/eino/schema" "github.com/google/uuid" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" "github.com/coze-dev/coze-studio/backend/pkg/logs" ) diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_variables.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_variables.go index 34875ecd9..a076a8db1 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_variables.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_variables.go @@ -22,10 +22,10 @@ import ( "github.com/cloudwego/eino/components/tool" "github.com/cloudwego/eino/components/tool/utils" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" + variables "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/agent/singleagent/internal/agentflow/node_tool_workflow.go b/backend/domain/agent/singleagent/internal/agentflow/node_tool_workflow.go index 5d76b1bef..ee0557303 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/node_tool_workflow.go +++ b/backend/domain/agent/singleagent/internal/agentflow/node_tool_workflow.go @@ -20,8 +20,8 @@ import ( "context" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" ) diff --git a/backend/domain/agent/singleagent/internal/dal/single_agent_draft.go b/backend/domain/agent/singleagent/internal/dal/single_agent_draft.go index 3c494f4fa..c30e96095 100644 --- a/backend/domain/agent/singleagent/internal/dal/single_agent_draft.go +++ b/backend/domain/agent/singleagent/internal/dal/single_agent_draft.go @@ -23,7 +23,7 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/internal/dal/model" diff --git a/backend/domain/agent/singleagent/internal/dal/single_agent_version.go b/backend/domain/agent/singleagent/internal/dal/single_agent_version.go index 71f7f5874..fb9cd8997 100644 --- a/backend/domain/agent/singleagent/internal/dal/single_agent_version.go +++ b/backend/domain/agent/singleagent/internal/dal/single_agent_version.go @@ -23,7 +23,7 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/internal/dal/query" diff --git a/backend/domain/agent/singleagent/service/publish.go b/backend/domain/agent/singleagent/service/publish.go index 6ae1aa2cf..ff8745762 100644 --- a/backend/domain/agent/singleagent/service/publish.go +++ b/backend/domain/agent/singleagent/service/publish.go @@ -23,7 +23,7 @@ import ( "time" "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" - crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector" + crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/pkg/kvstore" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" diff --git a/backend/domain/agent/singleagent/service/single_agent_impl.go b/backend/domain/agent/singleagent/service/single_agent_impl.go index 19cb18d33..6f518fe5d 100644 --- a/backend/domain/agent/singleagent/service/single_agent_impl.go +++ b/backend/domain/agent/singleagent/service/single_agent_impl.go @@ -27,8 +27,8 @@ import ( "github.com/cloudwego/eino/schema" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/internal/agentflow" "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/repository" diff --git a/backend/domain/app/service/publish_app.go b/backend/domain/app/service/publish_app.go index 71e725985..c89843a36 100644 --- a/backend/domain/app/service/publish_app.go +++ b/backend/domain/app/service/publish_app.go @@ -21,9 +21,9 @@ import ( "time" resourceCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - plugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + plugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/app/entity" "github.com/coze-dev/coze-studio/backend/domain/app/repository" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/app/service/service.go b/backend/domain/app/service/service.go index eb1fa4c9e..131f34dc3 100644 --- a/backend/domain/app/service/service.go +++ b/backend/domain/app/service/service.go @@ -19,7 +19,7 @@ package service import ( "context" - connectorModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" + connectorModel "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" "github.com/coze-dev/coze-studio/backend/domain/app/entity" ) diff --git a/backend/domain/app/service/service_impl.go b/backend/domain/app/service/service_impl.go index 3f77262fd..22939b4b2 100644 --- a/backend/domain/app/service/service_impl.go +++ b/backend/domain/app/service/service_impl.go @@ -22,15 +22,15 @@ import ( "gorm.io/gorm" - connectorModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" - databaseModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + connectorModel "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" + databaseModel "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" - crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/app/entity" "github.com/coze-dev/coze-studio/backend/domain/app/repository" diff --git a/backend/domain/connector/entity/connector.go b/backend/domain/connector/entity/connector.go index bd5533aff..ac63fe5ef 100644 --- a/backend/domain/connector/entity/connector.go +++ b/backend/domain/connector/entity/connector.go @@ -18,13 +18,13 @@ package entity import ( "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" + "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" ) // Use composition instead of aliasing for domain entities to enhance extensibility type Connector struct { - *connector.Connector + *model.Connector } func (c *Connector) ToVO() *developer_api.ConnectorInfo { diff --git a/backend/domain/connector/service/connector_impl.go b/backend/domain/connector/service/connector_impl.go index c7bd3ae13..810e55bf9 100644 --- a/backend/domain/connector/service/connector_impl.go +++ b/backend/domain/connector/service/connector_impl.go @@ -19,7 +19,7 @@ package connector import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector" + connector "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model" "github.com/coze-dev/coze-studio/backend/domain/connector/entity" "github.com/coze-dev/coze-studio/backend/infra/storage" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/conversation/agentrun/entity/run_record.go b/backend/domain/conversation/agentrun/entity/run_record.go index 870570ddb..98cd2e9eb 100644 --- a/backend/domain/conversation/agentrun/entity/run_record.go +++ b/backend/domain/conversation/agentrun/entity/run_record.go @@ -21,9 +21,9 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" message2 "github.com/coze-dev/coze-studio/backend/api/model/conversation/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/internal/dal/model" ) diff --git a/backend/domain/conversation/agentrun/internal/agent_info.go b/backend/domain/conversation/agentrun/internal/agent_info.go index f8f4fdfe5..e287b538b 100644 --- a/backend/domain/conversation/agentrun/internal/agent_info.go +++ b/backend/domain/conversation/agentrun/internal/agent_info.go @@ -18,8 +18,8 @@ package internal import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" + crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/conversation/agentrun/internal/chatflow_run.go b/backend/domain/conversation/agentrun/internal/chatflow_run.go index c1e77ff3b..ceba1bd57 100644 --- a/backend/domain/conversation/agentrun/internal/chatflow_run.go +++ b/backend/domain/conversation/agentrun/internal/chatflow_run.go @@ -26,9 +26,9 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" msgEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/infra/imagex" diff --git a/backend/domain/conversation/agentrun/internal/dal/model/run_record.gen.go b/backend/domain/conversation/agentrun/internal/dal/model/run_record.gen.go index 472363484..a4bdcf3d9 100644 --- a/backend/domain/conversation/agentrun/internal/dal/model/run_record.gen.go +++ b/backend/domain/conversation/agentrun/internal/dal/model/run_record.gen.go @@ -4,7 +4,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" +import agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" const TableNameRunRecord = "run_record" diff --git a/backend/domain/conversation/agentrun/internal/message_builder.go b/backend/domain/conversation/agentrun/internal/message_builder.go index 6b05e3efa..2441a4535 100644 --- a/backend/domain/conversation/agentrun/internal/message_builder.go +++ b/backend/domain/conversation/agentrun/internal/message_builder.go @@ -25,13 +25,13 @@ import ( "github.com/cloudwego/eino/schema" messageModel "github.com/coze-dev/coze-studio/backend/api/model/conversation/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" + crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/infra/imagex" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" msgEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" diff --git a/backend/domain/conversation/agentrun/internal/message_event.go b/backend/domain/conversation/agentrun/internal/message_event.go index bdf510acb..20b63eeec 100644 --- a/backend/domain/conversation/agentrun/internal/message_event.go +++ b/backend/domain/conversation/agentrun/internal/message_event.go @@ -29,12 +29,12 @@ import ( "github.com/cloudwego/eino/schema" "github.com/mohae/deepcopy" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" msgEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/conversation/agentrun/internal/run.go b/backend/domain/conversation/agentrun/internal/run.go index 4bbbb5fc8..2fedbffcd 100644 --- a/backend/domain/conversation/agentrun/internal/run.go +++ b/backend/domain/conversation/agentrun/internal/run.go @@ -23,9 +23,9 @@ import ( "github.com/cloudwego/eino/schema" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/repository" msgEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" diff --git a/backend/domain/conversation/agentrun/internal/run_process_event.go b/backend/domain/conversation/agentrun/internal/run_process_event.go index d5eb6733e..f12b8a19e 100644 --- a/backend/domain/conversation/agentrun/internal/run_process_event.go +++ b/backend/domain/conversation/agentrun/internal/run_process_event.go @@ -22,7 +22,7 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/repository" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/conversation/agentrun/internal/singleagent_run.go b/backend/domain/conversation/agentrun/internal/singleagent_run.go index 7e7f86816..5be411421 100644 --- a/backend/domain/conversation/agentrun/internal/singleagent_run.go +++ b/backend/domain/conversation/agentrun/internal/singleagent_run.go @@ -25,11 +25,11 @@ import ( "github.com/cloudwego/eino/schema" "github.com/mohae/deepcopy" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" - crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent" + singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" msgEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/infra/imagex" diff --git a/backend/domain/conversation/conversation/entity/conversation.go b/backend/domain/conversation/conversation/entity/conversation.go index 90d8471a5..e7f1cd3d8 100644 --- a/backend/domain/conversation/conversation/entity/conversation.go +++ b/backend/domain/conversation/conversation/entity/conversation.go @@ -18,10 +18,10 @@ package entity import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" + "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" ) -type Conversation = conversation.Conversation +type Conversation = model.Conversation type CreateMeta struct { Name string `json:"name"` @@ -41,7 +41,7 @@ type NewConversationCtxResponse struct { SectionID int64 `json:"section_id"` } -type GetCurrent = conversation.GetCurrent +type GetCurrent = model.GetCurrent type ListMeta struct { UserID int64 `json:"user_id"` diff --git a/backend/domain/conversation/conversation/internal/dal/dao.go b/backend/domain/conversation/conversation/internal/dal/dao.go index 1f65bdc92..400dafed8 100644 --- a/backend/domain/conversation/conversation/internal/dal/dao.go +++ b/backend/domain/conversation/conversation/internal/dal/dao.go @@ -24,7 +24,7 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" + conversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/internal/dal/query" diff --git a/backend/domain/conversation/conversation/service/conversation_test.go b/backend/domain/conversation/conversation/service/conversation_test.go index b42e016ee..4a184ad2d 100644 --- a/backend/domain/conversation/conversation/service/conversation_test.go +++ b/backend/domain/conversation/conversation/service/conversation_test.go @@ -25,7 +25,7 @@ import ( "go.uber.org/mock/gomock" "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation" + conversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/repository" diff --git a/backend/domain/conversation/message/entity/message.go b/backend/domain/conversation/message/entity/message.go index 7930f6e41..079f9d480 100644 --- a/backend/domain/conversation/message/entity/message.go +++ b/backend/domain/conversation/message/entity/message.go @@ -17,21 +17,21 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" ) -type Message = message.Message +type Message = model.Message type ListMeta struct { - ConversationID int64 `json:"conversation_id"` - RunID []*int64 `json:"run_id"` - UserID string `json:"user_id"` - AgentID int64 `json:"agent_id"` - OrderBy *string `json:"order_by"` - Limit int `json:"limit"` - Cursor int64 `json:"cursor"` // message id - Direction ScrollPageDirection `json:"direction"` // "prev" "Next" - MessageType []*message.MessageType `json:"message_type"` + ConversationID int64 `json:"conversation_id"` + RunID []*int64 `json:"run_id"` + UserID string `json:"user_id"` + AgentID int64 `json:"agent_id"` + OrderBy *string `json:"order_by"` + Limit int `json:"limit"` + Cursor int64 `json:"cursor"` // message id + Direction ScrollPageDirection `json:"direction"` // "prev" "Next" + MessageType []*model.MessageType `json:"message_type"` } type ListResult struct { diff --git a/backend/domain/conversation/message/internal/dal/message.go b/backend/domain/conversation/message/internal/dal/message.go index 3ef8fa615..6c3cdb9db 100644 --- a/backend/domain/conversation/message/internal/dal/message.go +++ b/backend/domain/conversation/message/internal/dal/message.go @@ -25,7 +25,7 @@ import ( "github.com/cloudwego/eino/schema" "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/internal/dal/query" diff --git a/backend/domain/conversation/message/repository/repository.go b/backend/domain/conversation/message/repository/repository.go index d6a7d9a43..24fa1e362 100644 --- a/backend/domain/conversation/message/repository/repository.go +++ b/backend/domain/conversation/message/repository/repository.go @@ -21,7 +21,7 @@ import ( "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/internal/dal" "github.com/coze-dev/coze-studio/backend/infra/idgen" diff --git a/backend/domain/conversation/message/service/message_impl.go b/backend/domain/conversation/message/service/message_impl.go index 376157257..7bae1f551 100644 --- a/backend/domain/conversation/message/service/message_impl.go +++ b/backend/domain/conversation/message/service/message_impl.go @@ -20,7 +20,7 @@ import ( "context" "sort" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/repository" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/conversation/message/service/message_test.go b/backend/domain/conversation/message/service/message_test.go index f0abd13a7..e29097c71 100644 --- a/backend/domain/conversation/message/service/message_test.go +++ b/backend/domain/conversation/message/service/message_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" + message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/conversation/message/repository" diff --git a/backend/domain/knowledge/entity/document.go b/backend/domain/knowledge/entity/document.go index c075ee3b1..9b87ca69a 100644 --- a/backend/domain/knowledge/entity/document.go +++ b/backend/domain/knowledge/entity/document.go @@ -17,16 +17,16 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/infra/document" "github.com/coze-dev/coze-studio/backend/infra/document/parser" ) type Document struct { - knowledge.Info + model.Info KnowledgeID int64 - Type knowledge.DocumentType + Type model.DocumentType RawContent string // User-defined original content URI string // Document URI URL string // Document URL diff --git a/backend/domain/knowledge/entity/knowledge.go b/backend/domain/knowledge/entity/knowledge.go index 33996ee6a..b117d882d 100644 --- a/backend/domain/knowledge/entity/knowledge.go +++ b/backend/domain/knowledge/entity/knowledge.go @@ -16,10 +16,10 @@ package entity -import "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" +import model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" type Knowledge struct { - *knowledge.Knowledge + *model.Knowledge } type WhereKnowledgeOption struct { diff --git a/backend/domain/knowledge/entity/slice.go b/backend/domain/knowledge/entity/slice.go index bf6db4b1b..3224029aa 100644 --- a/backend/domain/knowledge/entity/slice.go +++ b/backend/domain/knowledge/entity/slice.go @@ -17,10 +17,10 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" ) -type Slice = knowledge.Slice +type Slice = model.Slice type WhereSliceOpt struct { KnowledgeID int64 diff --git a/backend/domain/knowledge/entity/strategy.go b/backend/domain/knowledge/entity/strategy.go index b04ed6078..b53b3cf1b 100644 --- a/backend/domain/knowledge/entity/strategy.go +++ b/backend/domain/knowledge/entity/strategy.go @@ -17,11 +17,11 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/infra/document/parser" ) -type RetrievalStrategy = knowledge.RetrievalStrategy +type RetrievalStrategy = model.RetrievalStrategy // ParsingStrategy for document parse before indexing type ParsingStrategy struct { diff --git a/backend/domain/knowledge/processor/impl/base.go b/backend/domain/knowledge/processor/impl/base.go index 224176c91..d7ae69a3e 100644 --- a/backend/domain/knowledge/processor/impl/base.go +++ b/backend/domain/knowledge/processor/impl/base.go @@ -22,7 +22,7 @@ import ( "github.com/bytedance/sonic" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/processor/impl/custom_table.go b/backend/domain/knowledge/processor/impl/custom_table.go index d98a2cfa3..930ae00b1 100644 --- a/backend/domain/knowledge/processor/impl/custom_table.go +++ b/backend/domain/knowledge/processor/impl/custom_table.go @@ -17,7 +17,7 @@ package impl import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/logs" @@ -63,7 +63,7 @@ func (c *customTableProcessor) BeforeCreate() error { func (c *customTableProcessor) BuildDBModel() error { if len(c.Documents) > 0 && - c.Documents[0].Type == knowledge.DocumentTypeTable { + c.Documents[0].Type == model.DocumentTypeTable { if c.Documents[0].IsAppend { // Append the scene, no need to create a table // First, the user customizes some data, and second, uploads another form and appends the data in the form to the form diff --git a/backend/domain/knowledge/processor/impl/init.go b/backend/domain/knowledge/processor/impl/init.go index d1efe0195..db4be2018 100644 --- a/backend/domain/knowledge/processor/impl/init.go +++ b/backend/domain/knowledge/processor/impl/init.go @@ -19,7 +19,8 @@ package impl import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/processor" "github.com/coze-dev/coze-studio/backend/domain/knowledge/repository" @@ -68,7 +69,7 @@ func NewDocProcessor(ctx context.Context, config *DocProcessorConfig) (p process p = &customDocProcessor{ baseDocProcessor: *base, } - if config.Documents[0].Type == knowledge.DocumentTypeTable { + if config.Documents[0].Type == model.DocumentTypeTable { p = &customTableProcessor{ baseDocProcessor: *base, } diff --git a/backend/domain/knowledge/processor/impl/utils.go b/backend/domain/knowledge/processor/impl/utils.go index bac4593f1..edaf47d31 100644 --- a/backend/domain/knowledge/processor/impl/utils.go +++ b/backend/domain/knowledge/processor/impl/utils.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/infra/document/parser" ) diff --git a/backend/domain/knowledge/service/convert.go b/backend/domain/knowledge/service/convert.go index 9c70af946..d4c7de082 100644 --- a/backend/domain/knowledge/service/convert.go +++ b/backend/domain/knowledge/service/convert.go @@ -24,8 +24,7 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" "github.com/coze-dev/coze-studio/backend/infra/document" @@ -156,7 +155,7 @@ var s2dMapping = map[knowledge.DocumentType]slice2DocumentFn{ }, } - if len(slice.RawContent) == 0 || slice.RawContent[0].Type != knowledgeModel.SliceContentTypeTable || slice.RawContent[0].Table == nil { + if len(slice.RawContent) == 0 || slice.RawContent[0].Type != knowledge.SliceContentTypeTable || slice.RawContent[0].Table == nil { return nil, fmt.Errorf("[s2dMapping] columns data not provided") } @@ -223,8 +222,8 @@ var d2sMapping = map[knowledge.DocumentType]document2SliceFn{ slice.ID = id } - slice.RawContent = append(slice.RawContent, &knowledgeModel.SliceContent{ - Type: knowledgeModel.SliceContentTypeText, + slice.RawContent = append(slice.RawContent, &knowledge.SliceContent{ + Type: knowledge.SliceContentTypeText, Text: ptr.Of(doc.Content), }) @@ -280,9 +279,9 @@ var d2sMapping = map[knowledge.DocumentType]document2SliceFn{ } if vals, err := document.GetDocumentColumnData(doc); err == nil { - slice.RawContent = append(slice.RawContent, &knowledgeModel.SliceContent{ - Type: knowledgeModel.SliceContentTypeTable, - Table: &knowledgeModel.SliceTable{Columns: vals}, + slice.RawContent = append(slice.RawContent, &knowledge.SliceContent{ + Type: knowledge.SliceContentTypeTable, + Table: &knowledge.SliceTable{Columns: vals}, }) } @@ -305,8 +304,8 @@ var d2sMapping = map[knowledge.DocumentType]document2SliceFn{ slice.ID = id } - slice.RawContent = append(slice.RawContent, &knowledgeModel.SliceContent{ - Type: knowledgeModel.SliceContentTypeText, + slice.RawContent = append(slice.RawContent, &knowledge.SliceContent{ + Type: knowledge.SliceContentTypeText, Text: ptr.Of(doc.Content), }) diff --git a/backend/domain/knowledge/service/datacopy.go b/backend/domain/knowledge/service/datacopy.go index 5a691941f..a564f850e 100644 --- a/backend/domain/knowledge/service/datacopy.go +++ b/backend/domain/knowledge/service/datacopy.go @@ -27,8 +27,8 @@ import ( "github.com/cloudwego/eino/schema" "golang.org/x/sync/errgroup" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/contract/datacopy" + crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/datacopy" copyEntity "github.com/coze-dev/coze-studio/backend/domain/datacopy/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" diff --git a/backend/domain/knowledge/service/event_handle.go b/backend/domain/knowledge/service/event_handle.go index 494c3799f..fd6da4225 100644 --- a/backend/domain/knowledge/service/event_handle.go +++ b/backend/domain/knowledge/service/event_handle.go @@ -28,7 +28,7 @@ import ( "github.com/cloudwego/eino/components/document/parser" "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/service/interface.go b/backend/domain/knowledge/service/interface.go index 12571d86d..b8923993f 100644 --- a/backend/domain/knowledge/service/interface.go +++ b/backend/domain/knowledge/service/interface.go @@ -21,8 +21,8 @@ import ( "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/dal/model" "github.com/coze-dev/coze-studio/backend/infra/document" diff --git a/backend/domain/knowledge/service/knowledge.go b/backend/domain/knowledge/service/knowledge.go index 28838b3ff..1dffd39fc 100644 --- a/backend/domain/knowledge/service/knowledge.go +++ b/backend/domain/knowledge/service/knowledge.go @@ -35,9 +35,8 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" @@ -516,7 +515,7 @@ func (k *knowledgeSVC) MGetDocumentProgress(ctx context.Context, request *MGetDo Status: entity.DocumentStatus(documents[i].Status), StatusMsg: entity.DocumentStatus(documents[i].Status).String(), } - if documents[i].DocumentType == int32(knowledge.DocumentTypeImage) && len(documents[i].URI) != 0 { + if documents[i].DocumentType == int32(knowledgeModel.DocumentTypeImage) && len(documents[i].URI) != 0 { item.URL, err = k.storage.GetObjectUrl(ctx, documents[i].URI) if err != nil { logs.CtxErrorf(ctx, "get object url failed, err: %v", err) diff --git a/backend/domain/knowledge/service/knowledge_integration_test.go b/backend/domain/knowledge/service/knowledge_integration_test.go index 7a2f8b8b8..976f0850e 100644 --- a/backend/domain/knowledge/service/knowledge_integration_test.go +++ b/backend/domain/knowledge/service/knowledge_integration_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/suite" "gorm.io/gorm" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/dal/model" diff --git a/backend/domain/knowledge/service/knowledge_test.go b/backend/domain/knowledge/service/knowledge_test.go index 00710624b..6a6f6752c 100644 --- a/backend/domain/knowledge/service/knowledge_test.go +++ b/backend/domain/knowledge/service/knowledge_test.go @@ -29,7 +29,7 @@ import ( "gorm.io/driver/mysql" "gorm.io/gorm" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/infra/document" "github.com/coze-dev/coze-studio/backend/infra/document/parser/impl/builtin" diff --git a/backend/domain/knowledge/service/rdb.go b/backend/domain/knowledge/service/rdb.go index cc97c408c..04b5d01ed 100644 --- a/backend/domain/knowledge/service/rdb.go +++ b/backend/domain/knowledge/service/rdb.go @@ -19,7 +19,7 @@ package service import ( "context" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/service/retrieve.go b/backend/domain/knowledge/service/retrieve.go index a70baa18e..a2c7d942c 100644 --- a/backend/domain/knowledge/service/retrieve.go +++ b/backend/domain/knowledge/service/retrieve.go @@ -29,7 +29,7 @@ import ( "github.com/cloudwego/eino/schema" "golang.org/x/sync/errgroup" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/service/sheet.go b/backend/domain/knowledge/service/sheet.go index b4fd64ac8..66d3f4815 100644 --- a/backend/domain/knowledge/service/sheet.go +++ b/backend/domain/knowledge/service/sheet.go @@ -26,7 +26,7 @@ import ( "github.com/xuri/excelize/v2" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/service/sheet_test.go b/backend/domain/knowledge/service/sheet_test.go index 57e24d8b1..372321827 100644 --- a/backend/domain/knowledge/service/sheet_test.go +++ b/backend/domain/knowledge/service/sheet_test.go @@ -25,7 +25,7 @@ import ( "github.com/smartystreets/goconvey/convey" "go.uber.org/mock/gomock" - knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/consts" "github.com/coze-dev/coze-studio/backend/domain/knowledge/internal/convert" diff --git a/backend/domain/knowledge/service/validate.go b/backend/domain/knowledge/service/validate.go index 2123a3c13..6f9bc797c 100644 --- a/backend/domain/knowledge/service/validate.go +++ b/backend/domain/knowledge/service/validate.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/memory/database/entity/database.go b/backend/domain/memory/database/entity/database.go index 548039241..d1aea9e5e 100644 --- a/backend/domain/memory/database/entity/database.go +++ b/backend/domain/memory/database/entity/database.go @@ -19,11 +19,11 @@ package entity import ( "github.com/xuri/excelize/v2" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" + model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" ) -type Database = database.Database +type Database = model.Database // DatabaseFilter Database filter criteria type DatabaseFilter struct { @@ -52,7 +52,7 @@ type TableReaderMeta struct { SheetId int64 HeaderLineIdx int64 StartLineIdx int64 - ReaderMethod database.TableReadDataMethod + ReaderMethod model.TableReadDataMethod ReadLineCnt int64 Schema []*knowledge.DocTableColumn } diff --git a/backend/domain/memory/database/internal/convertor/types.go b/backend/domain/memory/database/internal/convertor/types.go index be1deae60..6846f1e03 100644 --- a/backend/domain/memory/database/internal/convertor/types.go +++ b/backend/domain/memory/database/internal/convertor/types.go @@ -21,8 +21,8 @@ import ( "strconv" "time" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/infra/rdb/entity" ) diff --git a/backend/domain/memory/database/internal/dal/agent_to_database.go b/backend/domain/memory/database/internal/dal/agent_to_database.go index f1acbbd9e..2b009d276 100644 --- a/backend/domain/memory/database/internal/dal/agent_to_database.go +++ b/backend/domain/memory/database/internal/dal/agent_to_database.go @@ -23,8 +23,8 @@ import ( "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/query" "github.com/coze-dev/coze-studio/backend/infra/idgen" diff --git a/backend/domain/memory/database/internal/dal/draft_database_info.go b/backend/domain/memory/database/internal/dal/draft_database_info.go index 95efe8ff6..b229ce023 100644 --- a/backend/domain/memory/database/internal/dal/draft_database_info.go +++ b/backend/domain/memory/database/internal/dal/draft_database_info.go @@ -26,8 +26,8 @@ import ( "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/query" diff --git a/backend/domain/memory/database/internal/dal/model/draft_database_info.gen.go b/backend/domain/memory/database/internal/dal/model/draft_database_info.gen.go index 9cbfa21a0..6dc1dce5e 100644 --- a/backend/domain/memory/database/internal/dal/model/draft_database_info.gen.go +++ b/backend/domain/memory/database/internal/dal/model/draft_database_info.gen.go @@ -5,7 +5,7 @@ package model import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "gorm.io/gorm" ) diff --git a/backend/domain/memory/database/internal/dal/model/online_database_info.gen.go b/backend/domain/memory/database/internal/dal/model/online_database_info.gen.go index bf871fbee..0e4d157f5 100644 --- a/backend/domain/memory/database/internal/dal/model/online_database_info.gen.go +++ b/backend/domain/memory/database/internal/dal/model/online_database_info.gen.go @@ -5,7 +5,7 @@ package model import ( - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "gorm.io/gorm" ) diff --git a/backend/domain/memory/database/internal/dal/online_database_info.go b/backend/domain/memory/database/internal/dal/online_database_info.go index a7e7a3a78..45c1ba620 100644 --- a/backend/domain/memory/database/internal/dal/online_database_info.go +++ b/backend/domain/memory/database/internal/dal/online_database_info.go @@ -26,8 +26,8 @@ import ( "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/query" diff --git a/backend/domain/memory/database/internal/physicaltable/physical.go b/backend/domain/memory/database/internal/physicaltable/physical.go index f5630de31..59827a5c2 100644 --- a/backend/domain/memory/database/internal/physicaltable/physical.go +++ b/backend/domain/memory/database/internal/physicaltable/physical.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/convertor" "github.com/coze-dev/coze-studio/backend/infra/rdb" @@ -55,7 +55,7 @@ func CreatePhysicalTable(ctx context.Context, db rdb.RDB, columns []*entity3.Col return physicalTableRes, nil } -func CreateFieldInfo(fieldItems []*model.FieldItem) ([]*model.FieldItem, []*entity3.Column) { +func CreateFieldInfo(fieldItems []*database.FieldItem) ([]*database.FieldItem, []*entity3.Column) { columns := make([]*entity3.Column, len(fieldItems)) fieldID := int64(1) diff --git a/backend/domain/memory/database/internal/sheet/sheet.go b/backend/domain/memory/database/internal/sheet/sheet.go index 4c69b702a..b03030e0f 100644 --- a/backend/domain/memory/database/internal/sheet/sheet.go +++ b/backend/domain/memory/database/internal/sheet/sheet.go @@ -35,8 +35,9 @@ import ( "github.com/extrame/xls" "github.com/xuri/excelize/v2" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/infra/storage" "github.com/coze-dev/coze-studio/backend/pkg/errorx" @@ -59,7 +60,7 @@ var ( type TosTableParser struct { UserID int64 - DocumentSource database.DocumentSourceType + DocumentSource model.DocumentSourceType TosURI string TosServ storage.Storage } @@ -551,11 +552,11 @@ func GetColumnTypePriority(columnType knowledge.ColumnType) int64 { return 0 } -func GetColumnTypeCategory(columnType knowledge.ColumnType) database.ColumnTypeCategory { +func GetColumnTypeCategory(columnType knowledge.ColumnType) model.ColumnTypeCategory { if columnType == knowledge.ColumnType_Number || columnType == knowledge.ColumnType_Float { - return database.ColumnTypeCategoryNumber + return model.ColumnTypeCategoryNumber } - return database.ColumnTypeCategoryText + return model.ColumnTypeCategoryText } func GetCellType(cellValue string) knowledge.ColumnType { @@ -710,7 +711,7 @@ func (t *TosTableParser) TransferPreviewData(ctx context.Context, columns []*kno return previewData, nil } -func CheckSheetIsValid(fields []*database.FieldItem, parsedColumns []*knowledge.DocTableColumn, sheet *entity.ExcelExtraInfo) (bool, *string) { +func CheckSheetIsValid(fields []*model.FieldItem, parsedColumns []*knowledge.DocTableColumn, sheet *entity.ExcelExtraInfo) (bool, *string) { if len(fields) != len(parsedColumns) { return false, ptr.Of("field number not match") } diff --git a/backend/domain/memory/database/repository/repository.go b/backend/domain/memory/database/repository/repository.go index ee5f9b8b9..50bca60b8 100644 --- a/backend/domain/memory/database/repository/repository.go +++ b/backend/domain/memory/database/repository/repository.go @@ -21,8 +21,8 @@ import ( "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/query" @@ -34,9 +34,9 @@ func NewAgentToDatabaseDAO(db *gorm.DB, idGen idgen.IDGenerator) AgentToDatabase } type AgentToDatabaseDAO interface { - BatchCreate(ctx context.Context, relations []*database.AgentToDatabase) ([]int64, error) - BatchDelete(ctx context.Context, basicRelations []*database.AgentToDatabaseBasic) error - ListByAgentID(ctx context.Context, agentID int64, tableType table.TableType) ([]*database.AgentToDatabase, error) + BatchCreate(ctx context.Context, relations []*model.AgentToDatabase) ([]int64, error) + BatchDelete(ctx context.Context, basicRelations []*model.AgentToDatabaseBasic) error + ListByAgentID(ctx context.Context, agentID int64, tableType table.TableType) ([]*model.AgentToDatabase, error) } func NewDraftDatabaseDAO(db *gorm.DB, idGen idgen.IDGenerator) DraftDAO { @@ -45,7 +45,7 @@ func NewDraftDatabaseDAO(db *gorm.DB, idGen idgen.IDGenerator) DraftDAO { type DraftDAO interface { Get(ctx context.Context, id int64) (*entity.Database, error) - List(ctx context.Context, filter *entity.DatabaseFilter, page *entity.Pagination, orderBy []*database.OrderBy) ([]*entity.Database, int64, error) + List(ctx context.Context, filter *entity.DatabaseFilter, page *entity.Pagination, orderBy []*model.OrderBy) ([]*entity.Database, int64, error) MGet(ctx context.Context, ids []int64) ([]*entity.Database, error) CreateWithTX(ctx context.Context, tx *query.QueryTx, database *entity.Database, draftID, onlineID int64, physicalTableName string) (*entity.Database, error) @@ -61,7 +61,7 @@ func NewOnlineDatabaseDAO(db *gorm.DB, idGen idgen.IDGenerator) OnlineDAO { type OnlineDAO interface { Get(ctx context.Context, id int64) (*entity.Database, error) MGet(ctx context.Context, ids []int64) ([]*entity.Database, error) - List(ctx context.Context, filter *entity.DatabaseFilter, page *entity.Pagination, orderBy []*database.OrderBy) ([]*entity.Database, int64, error) + List(ctx context.Context, filter *entity.DatabaseFilter, page *entity.Pagination, orderBy []*model.OrderBy) ([]*entity.Database, int64, error) UpdateWithTX(ctx context.Context, tx *query.QueryTx, database *entity.Database) (*entity.Database, error) CreateWithTX(ctx context.Context, tx *query.QueryTx, database *entity.Database, draftID, onlineID int64, physicalTableName string) (*entity.Database, error) diff --git a/backend/domain/memory/database/service/database.go b/backend/domain/memory/database/service/database.go index 9852c64d6..ad880a805 100644 --- a/backend/domain/memory/database/service/database.go +++ b/backend/domain/memory/database/service/database.go @@ -19,7 +19,7 @@ package service import ( "context" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge" diff --git a/backend/domain/memory/database/service/database_impl.go b/backend/domain/memory/database/service/database_impl.go index e18ce8a65..708fbd04d 100644 --- a/backend/domain/memory/database/service/database_impl.go +++ b/backend/domain/memory/database/service/database_impl.go @@ -34,9 +34,10 @@ import ( "github.com/coze-dev/coze-studio/backend/infra/cache" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" entity2 "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/convertor" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal/query" @@ -391,7 +392,7 @@ func (d databaseService) MGetDatabase(ctx context.Context, req *MGetDatabaseRequ for _, onlineDatabase := range onlineDatabases { if needSys, ok := onlineID2NeedSysFields[onlineDatabase.ID]; ok && needSys { if onlineDatabase.FieldList == nil { - onlineDatabase.FieldList = make([]*database.FieldItem, 0, 3) + onlineDatabase.FieldList = make([]*model.FieldItem, 0, 3) } onlineDatabase.FieldList = append(onlineDatabase.FieldList, physicaltable.GetDisplayCreateTimeField(), physicaltable.GetDisplayUidField(), physicaltable.GetDisplayIDField()) } diff --git a/backend/domain/memory/database/service/database_impl_test.go b/backend/domain/memory/database/service/database_impl_test.go index 98346a4fe..8aba9f2eb 100644 --- a/backend/domain/memory/database/service/database_impl_test.go +++ b/backend/domain/memory/database/service/database_impl_test.go @@ -30,8 +30,8 @@ import ( "gorm.io/driver/mysql" "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/data/database/table" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" entity2 "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity" "github.com/coze-dev/coze-studio/backend/domain/memory/database/internal/dal" "github.com/coze-dev/coze-studio/backend/domain/memory/database/repository" diff --git a/backend/domain/memory/variables/entity/variable_instance.go b/backend/domain/memory/variables/entity/variable_instance.go index 43954bd86..765ba73c7 100644 --- a/backend/domain/memory/variables/entity/variable_instance.go +++ b/backend/domain/memory/variables/entity/variable_instance.go @@ -24,9 +24,9 @@ import ( "strings" "time" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" + variables "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/types/errno" ) diff --git a/backend/domain/plugin/conf/load_plugin.go b/backend/domain/plugin/conf/load_plugin.go index f6ba3d28f..7c05a0167 100644 --- a/backend/domain/plugin/conf/load_plugin.go +++ b/backend/domain/plugin/conf/load_plugin.go @@ -29,8 +29,8 @@ import ( "gopkg.in/yaml.v3" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/plugin/dto/auth.go b/backend/domain/plugin/dto/auth.go index 91bd8e10c..25867d220 100644 --- a/backend/domain/plugin/dto/auth.go +++ b/backend/domain/plugin/dto/auth.go @@ -18,8 +18,8 @@ package dto import ( "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" ) diff --git a/backend/domain/plugin/dto/plugin.go b/backend/domain/plugin/dto/plugin.go index e71994dfb..82e2e08b8 100644 --- a/backend/domain/plugin/dto/plugin.go +++ b/backend/domain/plugin/dto/plugin.go @@ -19,8 +19,8 @@ package dto import ( "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" ) diff --git a/backend/domain/plugin/dto/tool.go b/backend/domain/plugin/dto/tool.go index ac7ff21e0..7dc61a4ee 100644 --- a/backend/domain/plugin/dto/tool.go +++ b/backend/domain/plugin/dto/tool.go @@ -20,7 +20,7 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" ) type CreateDraftToolsWithCodeRequest struct { diff --git a/backend/domain/plugin/entity/plugin.go b/backend/domain/plugin/entity/plugin.go index 0757b6f29..889d7ffa3 100644 --- a/backend/domain/plugin/entity/plugin.go +++ b/backend/domain/plugin/entity/plugin.go @@ -17,7 +17,7 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" ) diff --git a/backend/domain/plugin/entity/tool.go b/backend/domain/plugin/entity/tool.go index bea81b60a..3998cb93a 100644 --- a/backend/domain/plugin/entity/tool.go +++ b/backend/domain/plugin/entity/tool.go @@ -17,7 +17,7 @@ package entity import ( - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" ) type ToolInfo = model.ToolInfo diff --git a/backend/domain/plugin/internal/dal/agent_tool_version.go b/backend/domain/plugin/internal/dal/agent_tool_version.go index 237589ec2..b4ac8de2a 100644 --- a/backend/domain/plugin/internal/dal/agent_tool_version.go +++ b/backend/domain/plugin/internal/dal/agent_tool_version.go @@ -25,7 +25,7 @@ import ( "gorm.io/gorm" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "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" diff --git a/backend/domain/plugin/internal/dal/model/agent_tool_draft.gen.go b/backend/domain/plugin/internal/dal/model/agent_tool_draft.gen.go index 913392496..49682eeb3 100644 --- a/backend/domain/plugin/internal/dal/model/agent_tool_draft.gen.go +++ b/backend/domain/plugin/internal/dal/model/agent_tool_draft.gen.go @@ -20,7 +20,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNameAgentToolDraft = "agent_tool_draft" diff --git a/backend/domain/plugin/internal/dal/model/agent_tool_version.gen.go b/backend/domain/plugin/internal/dal/model/agent_tool_version.gen.go index 2ab79f659..0c09b5505 100644 --- a/backend/domain/plugin/internal/dal/model/agent_tool_version.gen.go +++ b/backend/domain/plugin/internal/dal/model/agent_tool_version.gen.go @@ -20,7 +20,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNameAgentToolVersion = "agent_tool_version" diff --git a/backend/domain/plugin/internal/dal/model/plugin.gen.go b/backend/domain/plugin/internal/dal/model/plugin.gen.go index 9dd96fb18..6ca6e98b3 100644 --- a/backend/domain/plugin/internal/dal/model/plugin.gen.go +++ b/backend/domain/plugin/internal/dal/model/plugin.gen.go @@ -20,7 +20,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNamePlugin = "plugin" diff --git a/backend/domain/plugin/internal/dal/model/plugin_draft.gen.go b/backend/domain/plugin/internal/dal/model/plugin_draft.gen.go index 084244d90..95f2dd27c 100644 --- a/backend/domain/plugin/internal/dal/model/plugin_draft.gen.go +++ b/backend/domain/plugin/internal/dal/model/plugin_draft.gen.go @@ -5,7 +5,7 @@ package model import ( - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "gorm.io/gorm" ) diff --git a/backend/domain/plugin/internal/dal/model/plugin_oauth_auth.gen.go b/backend/domain/plugin/internal/dal/model/plugin_oauth_auth.gen.go index 6e72c831c..498b656fb 100644 --- a/backend/domain/plugin/internal/dal/model/plugin_oauth_auth.gen.go +++ b/backend/domain/plugin/internal/dal/model/plugin_oauth_auth.gen.go @@ -4,7 +4,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNamePluginOauthAuth = "plugin_oauth_auth" diff --git a/backend/domain/plugin/internal/dal/model/plugin_version.gen.go b/backend/domain/plugin/internal/dal/model/plugin_version.gen.go index a171823de..61e881fd9 100644 --- a/backend/domain/plugin/internal/dal/model/plugin_version.gen.go +++ b/backend/domain/plugin/internal/dal/model/plugin_version.gen.go @@ -21,7 +21,7 @@ package model import ( - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "gorm.io/gorm" ) diff --git a/backend/domain/plugin/internal/dal/model/tool.gen.go b/backend/domain/plugin/internal/dal/model/tool.gen.go index 2f9adf814..2b77a30e3 100644 --- a/backend/domain/plugin/internal/dal/model/tool.gen.go +++ b/backend/domain/plugin/internal/dal/model/tool.gen.go @@ -20,7 +20,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNameTool = "tool" diff --git a/backend/domain/plugin/internal/dal/model/tool_draft.gen.go b/backend/domain/plugin/internal/dal/model/tool_draft.gen.go index db28732de..83cfe3f4e 100644 --- a/backend/domain/plugin/internal/dal/model/tool_draft.gen.go +++ b/backend/domain/plugin/internal/dal/model/tool_draft.gen.go @@ -4,7 +4,7 @@ package model -import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" +import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" const TableNameToolDraft = "tool_draft" diff --git a/backend/domain/plugin/internal/dal/model/tool_version.gen.go b/backend/domain/plugin/internal/dal/model/tool_version.gen.go index 8d39f626c..655efa628 100644 --- a/backend/domain/plugin/internal/dal/model/tool_version.gen.go +++ b/backend/domain/plugin/internal/dal/model/tool_version.gen.go @@ -21,7 +21,7 @@ package model import ( - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "gorm.io/gorm" ) diff --git a/backend/domain/plugin/internal/dal/plugin.go b/backend/domain/plugin/internal/dal/plugin.go index 200584dfd..ff1222b64 100644 --- a/backend/domain/plugin/internal/dal/plugin.go +++ b/backend/domain/plugin/internal/dal/plugin.go @@ -26,7 +26,7 @@ import ( "gorm.io/gorm" plugin_develop_common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/model" diff --git a/backend/domain/plugin/internal/dal/plugin_draft.go b/backend/domain/plugin/internal/dal/plugin_draft.go index f821aaa14..40ba82a1c 100644 --- a/backend/domain/plugin/internal/dal/plugin_draft.go +++ b/backend/domain/plugin/internal/dal/plugin_draft.go @@ -26,7 +26,7 @@ import ( "gorm.io/gorm" plugin_develop_common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/conf" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/internal/dal/plugin_version.go b/backend/domain/plugin/internal/dal/plugin_version.go index d9a264b70..89b76a1f5 100644 --- a/backend/domain/plugin/internal/dal/plugin_version.go +++ b/backend/domain/plugin/internal/dal/plugin_version.go @@ -25,7 +25,7 @@ import ( "gorm.io/gorm" plugin_develop_common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/model" diff --git a/backend/domain/plugin/internal/dal/tool.go b/backend/domain/plugin/internal/dal/tool.go index 38580b9e7..5be97f1f3 100644 --- a/backend/domain/plugin/internal/dal/tool.go +++ b/backend/domain/plugin/internal/dal/tool.go @@ -24,7 +24,7 @@ import ( "gorm.io/gen/field" "gorm.io/gorm" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "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" diff --git a/backend/domain/plugin/internal/dal/tool_draft.go b/backend/domain/plugin/internal/dal/tool_draft.go index 16a5783e3..b7edd2f73 100644 --- a/backend/domain/plugin/internal/dal/tool_draft.go +++ b/backend/domain/plugin/internal/dal/tool_draft.go @@ -26,7 +26,7 @@ import ( "gorm.io/gorm" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/domain/plugin/conf" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/internal/dal/tool_version.go b/backend/domain/plugin/internal/dal/tool_version.go index 51a80cf0c..29cf0a41e 100644 --- a/backend/domain/plugin/internal/dal/tool_version.go +++ b/backend/domain/plugin/internal/dal/tool_version.go @@ -22,7 +22,7 @@ import ( "gorm.io/gorm" - pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginModel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "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" diff --git a/backend/domain/plugin/internal/encoder/req_encode.go b/backend/domain/plugin/internal/encoder/req_encode.go index 8b4a55fda..1a7b00942 100644 --- a/backend/domain/plugin/internal/encoder/req_encode.go +++ b/backend/domain/plugin/internal/encoder/req_encode.go @@ -27,7 +27,7 @@ import ( "github.com/shopspring/decimal" "gopkg.in/yaml.v3" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" ) func EncodeBodyWithContentType(contentType string, body map[string]any) ([]byte, error) { diff --git a/backend/domain/plugin/internal/openapi/convert_protocol.go b/backend/domain/plugin/internal/openapi/convert_protocol.go index 0fb03ee7f..11e4e6d09 100644 --- a/backend/domain/plugin/internal/openapi/convert_protocol.go +++ b/backend/domain/plugin/internal/openapi/convert_protocol.go @@ -34,8 +34,8 @@ import ( postman "github.com/rbretecher/go-postman-collection" "gopkg.in/yaml.v3" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "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/logs" diff --git a/backend/domain/plugin/repository/plugin_impl.go b/backend/domain/plugin/repository/plugin_impl.go index 88aca4ffd..76e02dfe4 100644 --- a/backend/domain/plugin/repository/plugin_impl.go +++ b/backend/domain/plugin/repository/plugin_impl.go @@ -26,9 +26,9 @@ import ( "gorm.io/gorm" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" pluginConf "github.com/coze-dev/coze-studio/backend/domain/plugin/conf" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/repository/plugin_repository.go b/backend/domain/plugin/repository/plugin_repository.go index be88c12d9..2edfa4a98 100644 --- a/backend/domain/plugin/repository/plugin_repository.go +++ b/backend/domain/plugin/repository/plugin_repository.go @@ -19,7 +19,7 @@ package repository import ( "context" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" ) diff --git a/backend/domain/plugin/repository/tool_impl.go b/backend/domain/plugin/repository/tool_impl.go index 120da5fac..e4100012c 100644 --- a/backend/domain/plugin/repository/tool_impl.go +++ b/backend/domain/plugin/repository/tool_impl.go @@ -28,9 +28,9 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" pluginCommon "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" pluginConf "github.com/coze-dev/coze-studio/backend/domain/plugin/conf" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/repository/tool_repository.go b/backend/domain/plugin/repository/tool_repository.go index d6cf39211..bd2ff0349 100644 --- a/backend/domain/plugin/repository/tool_repository.go +++ b/backend/domain/plugin/repository/tool_repository.go @@ -19,7 +19,7 @@ package repository import ( "context" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" ) diff --git a/backend/domain/plugin/service/agent_tool.go b/backend/domain/plugin/service/agent_tool.go index 852561b84..70fb124e1 100644 --- a/backend/domain/plugin/service/agent_tool.go +++ b/backend/domain/plugin/service/agent_tool.go @@ -26,8 +26,8 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/repository" diff --git a/backend/domain/plugin/service/exec_tool.go b/backend/domain/plugin/service/exec_tool.go index bd784cd18..479a3e460 100644 --- a/backend/domain/plugin/service/exec_tool.go +++ b/backend/domain/plugin/service/exec_tool.go @@ -30,8 +30,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/service/tool" diff --git a/backend/domain/plugin/service/exec_tool_test.go b/backend/domain/plugin/service/exec_tool_test.go index 6b8a20149..331c88879 100644 --- a/backend/domain/plugin/service/exec_tool_test.go +++ b/backend/domain/plugin/service/exec_tool_test.go @@ -28,7 +28,7 @@ import ( "github.com/getkin/kin-openapi/openapi3" "github.com/stretchr/testify/assert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" "github.com/coze-dev/coze-studio/backend/pkg/errorx" ) diff --git a/backend/domain/plugin/service/plugin_auth.go b/backend/domain/plugin/service/plugin_auth.go index 45c30c5eb..8992f0395 100644 --- a/backend/domain/plugin/service/plugin_auth.go +++ b/backend/domain/plugin/service/plugin_auth.go @@ -19,8 +19,8 @@ import ( "fmt" "strings" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/sonic" diff --git a/backend/domain/plugin/service/plugin_draft.go b/backend/domain/plugin/service/plugin_draft.go index ca5c69277..203801a9e 100644 --- a/backend/domain/plugin/service/plugin_draft.go +++ b/backend/domain/plugin/service/plugin_draft.go @@ -28,13 +28,13 @@ import ( "github.com/getkin/kin-openapi/openapi3" "gopkg.in/yaml.v3" - searchModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search" + searchModel "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/internal/openapi" diff --git a/backend/domain/plugin/service/plugin_oauth.go b/backend/domain/plugin/service/plugin_oauth.go index a71ff021e..3818bcf96 100644 --- a/backend/domain/plugin/service/plugin_oauth.go +++ b/backend/domain/plugin/service/plugin_oauth.go @@ -29,8 +29,8 @@ import ( common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" "github.com/coze-dev/coze-studio/backend/bizpkg/config" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/encrypt" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/service/plugin_online.go b/backend/domain/plugin/service/plugin_online.go index 637e044ca..f0093af36 100644 --- a/backend/domain/plugin/service/plugin_online.go +++ b/backend/domain/plugin/service/plugin_online.go @@ -21,12 +21,12 @@ import ( "fmt" "sort" - searchModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" pluginCommon "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search" + searchModel "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" pluginConf "github.com/coze-dev/coze-studio/backend/domain/plugin/conf" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/service/plugin_release.go b/backend/domain/plugin/service/plugin_release.go index 025e0e514..b5a0d0b3c 100644 --- a/backend/domain/plugin/service/plugin_release.go +++ b/backend/domain/plugin/service/plugin_release.go @@ -25,7 +25,7 @@ import ( "golang.org/x/mod/semver" common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/plugin/repository" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/plugin/service/plugin_saas.go b/backend/domain/plugin/service/plugin_saas.go index 5e96c70dc..03ddab3b7 100644 --- a/backend/domain/plugin/service/plugin_saas.go +++ b/backend/domain/plugin/service/plugin_saas.go @@ -25,8 +25,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" pluginCommon "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" domainDto "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" diff --git a/backend/domain/plugin/service/service.go b/backend/domain/plugin/service/service.go index 814d697f4..60b777042 100644 --- a/backend/domain/plugin/service/service.go +++ b/backend/domain/plugin/service/service.go @@ -19,7 +19,7 @@ package service import ( "context" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" ) diff --git a/backend/domain/plugin/service/tool/invocation_args.go b/backend/domain/plugin/service/tool/invocation_args.go index 5b73475bf..44008c28c 100644 --- a/backend/domain/plugin/service/tool/invocation_args.go +++ b/backend/domain/plugin/service/tool/invocation_args.go @@ -26,13 +26,13 @@ import ( "github.com/bytedance/sonic" "github.com/getkin/kin-openapi/openapi3" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" + variables "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/infra/storage" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/plugin/service/tool/invocation_http.go b/backend/domain/plugin/service/tool/invocation_http.go index ac8873bcd..5ed6072b0 100644 --- a/backend/domain/plugin/service/tool/invocation_http.go +++ b/backend/domain/plugin/service/tool/invocation_http.go @@ -31,8 +31,8 @@ import ( "github.com/go-resty/resty/v2" "github.com/tidwall/sjson" - pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/internal/encoder" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/i18n" diff --git a/backend/domain/search/entity/resource_doc.go b/backend/domain/search/entity/resource_doc.go index 1291f880d..de5f9f22c 100644 --- a/backend/domain/search/entity/resource_doc.go +++ b/backend/domain/search/entity/resource_doc.go @@ -17,7 +17,7 @@ package entity import ( - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" ) type ResourceDocument = model.ResourceDocument diff --git a/backend/domain/search/entity/search.go b/backend/domain/search/entity/search.go index b150bce9b..6954365d1 100644 --- a/backend/domain/search/entity/search.go +++ b/backend/domain/search/entity/search.go @@ -18,7 +18,7 @@ package entity import ( "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" ) const ( diff --git a/backend/domain/search/service/search.go b/backend/domain/search/service/search.go index 8af8715eb..2ad708473 100644 --- a/backend/domain/search/service/search.go +++ b/backend/domain/search/service/search.go @@ -22,7 +22,7 @@ import ( "github.com/bytedance/sonic" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search" + model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model" searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity" "github.com/coze-dev/coze-studio/backend/infra/es" "github.com/coze-dev/coze-studio/backend/pkg/lang/conv" diff --git a/backend/domain/workflow/component_interface.go b/backend/domain/workflow/component_interface.go index 9e40bc3ca..5b43d0206 100644 --- a/backend/domain/workflow/component_interface.go +++ b/backend/domain/workflow/component_interface.go @@ -23,7 +23,7 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" conventity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/config" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/entity/vo/curd.go b/backend/domain/workflow/entity/vo/curd.go index e81666199..4d09524fa 100644 --- a/backend/domain/workflow/entity/vo/curd.go +++ b/backend/domain/workflow/entity/vo/curd.go @@ -17,7 +17,7 @@ package vo import ( - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + model "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" ) type Page struct { diff --git a/backend/domain/workflow/entity/vo/node.go b/backend/domain/workflow/entity/vo/node.go index 08520f0be..eb5e4dace 100644 --- a/backend/domain/workflow/entity/vo/node.go +++ b/backend/domain/workflow/entity/vo/node.go @@ -23,7 +23,7 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/sonic" "github.com/coze-dev/coze-studio/backend/types/errno" diff --git a/backend/domain/workflow/entity/workflow_execution.go b/backend/domain/workflow/entity/workflow_execution.go index f7ce21d02..e7208579f 100644 --- a/backend/domain/workflow/entity/workflow_execution.go +++ b/backend/domain/workflow/entity/workflow_execution.go @@ -19,8 +19,8 @@ package entity import ( "time" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" ) type WorkflowExecuteStatus workflow.WorkflowExeStatus diff --git a/backend/domain/workflow/internal/canvas/adaptor/canvas_test.go b/backend/domain/workflow/internal/canvas/adaptor/canvas_test.go index 70e1f58a0..5d3089095 100644 --- a/backend/domain/workflow/internal/canvas/adaptor/canvas_test.go +++ b/backend/domain/workflow/internal/canvas/adaptor/canvas_test.go @@ -35,15 +35,15 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - crossmodel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge/knowledgemock" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/pluginmock" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/databasemock" + crossmodel "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/knowledgemock" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/pluginmock" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" userentity "github.com/coze-dev/coze-studio/backend/domain/user/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/canvas/adaptor/to_schema.go b/backend/domain/workflow/internal/canvas/adaptor/to_schema.go index 63aa47902..8183c17e9 100644 --- a/backend/domain/workflow/internal/canvas/adaptor/to_schema.go +++ b/backend/domain/workflow/internal/canvas/adaptor/to_schema.go @@ -26,7 +26,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + model "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/compose/designate_option.go b/backend/domain/workflow/internal/compose/designate_option.go index d97d59fd6..7d3834a1d 100644 --- a/backend/domain/workflow/internal/compose/designate_option.go +++ b/backend/domain/workflow/internal/compose/designate_option.go @@ -24,7 +24,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + model "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" workflow2 "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/compose/state.go b/backend/domain/workflow/internal/compose/state.go index f60b862cd..3b182babe 100644 --- a/backend/domain/workflow/internal/compose/state.go +++ b/backend/domain/workflow/internal/compose/state.go @@ -25,9 +25,9 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflow2 "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" diff --git a/backend/domain/workflow/internal/compose/workflow_run.go b/backend/domain/workflow/internal/compose/workflow_run.go index a87a72e60..3df6af846 100644 --- a/backend/domain/workflow/internal/compose/workflow_run.go +++ b/backend/domain/workflow/internal/compose/workflow_run.go @@ -28,7 +28,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + model "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" wf "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/compose/workflow_tool.go b/backend/domain/workflow/internal/compose/workflow_tool.go index 4d523bedb..2ccd6a6a0 100644 --- a/backend/domain/workflow/internal/compose/workflow_tool.go +++ b/backend/domain/workflow/internal/compose/workflow_tool.go @@ -26,7 +26,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/pkg/lang/slices" wf "github.com/coze-dev/coze-studio/backend/domain/workflow" diff --git a/backend/domain/workflow/internal/execute/callback.go b/backend/domain/workflow/internal/execute/callback.go index 1bf8e5cce..6d00da9bb 100644 --- a/backend/domain/workflow/internal/execute/callback.go +++ b/backend/domain/workflow/internal/execute/callback.go @@ -34,7 +34,7 @@ import ( "github.com/cloudwego/eino/schema" callbacks2 "github.com/cloudwego/eino/utils/callbacks" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/execute/context.go b/backend/domain/workflow/internal/execute/context.go index 0fa092198..2db282290 100644 --- a/backend/domain/workflow/internal/execute/context.go +++ b/backend/domain/workflow/internal/execute/context.go @@ -28,7 +28,7 @@ import ( "github.com/cloudwego/eino/compose" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/execute/event_handle.go b/backend/domain/workflow/internal/execute/event_handle.go index 72ca18d05..ccfd1bd19 100644 --- a/backend/domain/workflow/internal/execute/event_handle.go +++ b/backend/domain/workflow/internal/execute/event_handle.go @@ -27,7 +27,7 @@ import ( "github.com/bytedance/sonic" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/execute/tool_option.go b/backend/domain/workflow/internal/execute/tool_option.go index 08cd4165e..fc5aa15df 100644 --- a/backend/domain/workflow/internal/execute/tool_option.go +++ b/backend/domain/workflow/internal/execute/tool_option.go @@ -21,7 +21,7 @@ import ( "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" ) diff --git a/backend/domain/workflow/internal/nodes/conversation/clearconversationhistory.go b/backend/domain/workflow/internal/nodes/conversation/clearconversationhistory.go index e30d95fcf..2266cef9d 100644 --- a/backend/domain/workflow/internal/nodes/conversation/clearconversationhistory.go +++ b/backend/domain/workflow/internal/nodes/conversation/clearconversationhistory.go @@ -22,8 +22,8 @@ import ( "fmt" "sync/atomic" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" wf "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/nodes/conversation/conversationhistory.go b/backend/domain/workflow/internal/nodes/conversation/conversationhistory.go index 91d3d10ad..0187ed930 100644 --- a/backend/domain/workflow/internal/nodes/conversation/conversationhistory.go +++ b/backend/domain/workflow/internal/nodes/conversation/conversationhistory.go @@ -21,9 +21,9 @@ import ( "errors" "fmt" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" wf "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/internal/nodes/conversation/conversationlist.go b/backend/domain/workflow/internal/nodes/conversation/conversationlist.go index 2ca5b083a..7912ce144 100644 --- a/backend/domain/workflow/internal/nodes/conversation/conversationlist.go +++ b/backend/domain/workflow/internal/nodes/conversation/conversationlist.go @@ -21,7 +21,7 @@ import ( "fmt" "strconv" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/internal/nodes/conversation/createconversation.go b/backend/domain/workflow/internal/nodes/conversation/createconversation.go index 2b3c71295..63122e1a1 100644 --- a/backend/domain/workflow/internal/nodes/conversation/createconversation.go +++ b/backend/domain/workflow/internal/nodes/conversation/createconversation.go @@ -23,8 +23,8 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" conventity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow" diff --git a/backend/domain/workflow/internal/nodes/conversation/createmessage.go b/backend/domain/workflow/internal/nodes/conversation/createmessage.go index 0579a7406..8879d826a 100644 --- a/backend/domain/workflow/internal/nodes/conversation/createmessage.go +++ b/backend/domain/workflow/internal/nodes/conversation/createmessage.go @@ -29,11 +29,11 @@ import ( einoSchema "github.com/cloudwego/eino/schema" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/pkg/errorx" agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity" diff --git a/backend/domain/workflow/internal/nodes/conversation/deleteconversation.go b/backend/domain/workflow/internal/nodes/conversation/deleteconversation.go index e1785029d..dd0880a30 100644 --- a/backend/domain/workflow/internal/nodes/conversation/deleteconversation.go +++ b/backend/domain/workflow/internal/nodes/conversation/deleteconversation.go @@ -21,7 +21,7 @@ import ( "errors" "fmt" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/internal/nodes/conversation/deletemessage.go b/backend/domain/workflow/internal/nodes/conversation/deletemessage.go index 2b4a66ad7..e05959994 100644 --- a/backend/domain/workflow/internal/nodes/conversation/deletemessage.go +++ b/backend/domain/workflow/internal/nodes/conversation/deletemessage.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" msgentity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity" "github.com/coze-dev/coze-studio/backend/pkg/errorx" diff --git a/backend/domain/workflow/internal/nodes/conversation/editmessage.go b/backend/domain/workflow/internal/nodes/conversation/editmessage.go index f4c38a586..4b969548d 100644 --- a/backend/domain/workflow/internal/nodes/conversation/editmessage.go +++ b/backend/domain/workflow/internal/nodes/conversation/editmessage.go @@ -22,11 +22,9 @@ import ( "fmt" "strconv" - model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message" - - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" @@ -121,7 +119,7 @@ func (e *EditMessage) Invoke(ctx context.Context, input map[string]any) (map[str return successMap, err } - msg, err := message.DefaultSVC().GetMessageByID(ctx, messageID) + msg, err := crossmessage.DefaultSVC().GetMessageByID(ctx, messageID) if err != nil { return nil, err } diff --git a/backend/domain/workflow/internal/nodes/conversation/messagelist.go b/backend/domain/workflow/internal/nodes/conversation/messagelist.go index db8611fcf..5806c1db2 100644 --- a/backend/domain/workflow/internal/nodes/conversation/messagelist.go +++ b/backend/domain/workflow/internal/nodes/conversation/messagelist.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/nodes/conversation/updateconversation.go b/backend/domain/workflow/internal/nodes/conversation/updateconversation.go index 00ff90315..b02a0e340 100644 --- a/backend/domain/workflow/internal/nodes/conversation/updateconversation.go +++ b/backend/domain/workflow/internal/nodes/conversation/updateconversation.go @@ -22,7 +22,7 @@ import ( "fmt" "strconv" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" wf "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/internal/nodes/convert.go b/backend/domain/workflow/internal/nodes/convert.go index 6d549261c..ec1acd393 100644 --- a/backend/domain/workflow/internal/nodes/convert.go +++ b/backend/domain/workflow/internal/nodes/convert.go @@ -25,7 +25,7 @@ import ( "strconv" "strings" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/pkg/errorx" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/workflow/internal/nodes/database/adapt.go b/backend/domain/workflow/internal/nodes/database/adapt.go index 173e8c69a..f810459d5 100644 --- a/backend/domain/workflow/internal/nodes/database/adapt.go +++ b/backend/domain/workflow/internal/nodes/database/adapt.go @@ -21,7 +21,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/schema" diff --git a/backend/domain/workflow/internal/nodes/database/common.go b/backend/domain/workflow/internal/nodes/database/common.go index 8734d967d..607b183cd 100644 --- a/backend/domain/workflow/internal/nodes/database/common.go +++ b/backend/domain/workflow/internal/nodes/database/common.go @@ -25,8 +25,8 @@ import ( "github.com/cloudwego/eino/compose" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/nodes" diff --git a/backend/domain/workflow/internal/nodes/database/customsql.go b/backend/domain/workflow/internal/nodes/database/customsql.go index f1c6cad64..e00c48c12 100644 --- a/backend/domain/workflow/internal/nodes/database/customsql.go +++ b/backend/domain/workflow/internal/nodes/database/customsql.go @@ -24,8 +24,8 @@ import ( "regexp" "strconv" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/database/customsql_test.go b/backend/domain/workflow/internal/nodes/database/customsql_test.go index 69ed10b42..c7625b175 100644 --- a/backend/domain/workflow/internal/nodes/database/customsql_test.go +++ b/backend/domain/workflow/internal/nodes/database/customsql_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/databasemock" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/schema" diff --git a/backend/domain/workflow/internal/nodes/database/delete.go b/backend/domain/workflow/internal/nodes/database/delete.go index ab75a6dd3..c14ce8358 100644 --- a/backend/domain/workflow/internal/nodes/database/delete.go +++ b/backend/domain/workflow/internal/nodes/database/delete.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/database/insert.go b/backend/domain/workflow/internal/nodes/database/insert.go index e4b95e978..f3f550f4c 100644 --- a/backend/domain/workflow/internal/nodes/database/insert.go +++ b/backend/domain/workflow/internal/nodes/database/insert.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/database/query.go b/backend/domain/workflow/internal/nodes/database/query.go index cda857233..fa970c9b5 100644 --- a/backend/domain/workflow/internal/nodes/database/query.go +++ b/backend/domain/workflow/internal/nodes/database/query.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/database/query_test.go b/backend/domain/workflow/internal/nodes/database/query_test.go index 18a7b7745..55a1f9bc8 100644 --- a/backend/domain/workflow/internal/nodes/database/query_test.go +++ b/backend/domain/workflow/internal/nodes/database/query_test.go @@ -26,10 +26,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + "github.com/coze-dev/coze-studio/backend/crossdomain/database/databasemock" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/schema" diff --git a/backend/domain/workflow/internal/nodes/database/update.go b/backend/domain/workflow/internal/nodes/database/update.go index 84bc469bf..950ff94ff 100644 --- a/backend/domain/workflow/internal/nodes/database/update.go +++ b/backend/domain/workflow/internal/nodes/database/update.go @@ -22,8 +22,8 @@ import ( "fmt" "strconv" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" - crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database" + crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/intentdetector/intent_detector.go b/backend/domain/workflow/internal/nodes/intentdetector/intent_detector.go index 561794aae..d5377de9f 100644 --- a/backend/domain/workflow/internal/nodes/intentdetector/intent_detector.go +++ b/backend/domain/workflow/internal/nodes/intentdetector/intent_detector.go @@ -30,7 +30,7 @@ import ( "github.com/spf13/cast" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/knowledge/adaptor.go b/backend/domain/workflow/internal/nodes/knowledge/adaptor.go index 7089bc8cf..10fe16144 100644 --- a/backend/domain/workflow/internal/nodes/knowledge/adaptor.go +++ b/backend/domain/workflow/internal/nodes/knowledge/adaptor.go @@ -19,7 +19,7 @@ package knowledge import ( "fmt" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" ) func convertParsingType(p string) (knowledge.ParseMode, error) { diff --git a/backend/domain/workflow/internal/nodes/knowledge/knowledge_deleter.go b/backend/domain/workflow/internal/nodes/knowledge/knowledge_deleter.go index 502f8f476..c35951a3c 100644 --- a/backend/domain/workflow/internal/nodes/knowledge/knowledge_deleter.go +++ b/backend/domain/workflow/internal/nodes/knowledge/knowledge_deleter.go @@ -24,8 +24,8 @@ import ( "github.com/spf13/cast" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/knowledge/knowledge_indexer.go b/backend/domain/workflow/internal/nodes/knowledge/knowledge_indexer.go index d5feb8f0e..ca94331d8 100644 --- a/backend/domain/workflow/internal/nodes/knowledge/knowledge_indexer.go +++ b/backend/domain/workflow/internal/nodes/knowledge/knowledge_indexer.go @@ -27,8 +27,8 @@ import ( "github.com/spf13/cast" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/knowledge/knowledge_retrieve.go b/backend/domain/workflow/internal/nodes/knowledge/knowledge_retrieve.go index d834d77e5..4313d9797 100644 --- a/backend/domain/workflow/internal/nodes/knowledge/knowledge_retrieve.go +++ b/backend/domain/workflow/internal/nodes/knowledge/knowledge_retrieve.go @@ -25,10 +25,10 @@ import ( einoSchema "github.com/cloudwego/eino/schema" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/llm/llm.go b/backend/domain/workflow/internal/nodes/llm/llm.go index c1e0bf2c6..309493efa 100644 --- a/backend/domain/workflow/internal/nodes/llm/llm.go +++ b/backend/domain/workflow/internal/nodes/llm/llm.go @@ -34,13 +34,13 @@ import ( callbacks2 "github.com/cloudwego/eino/utils/callbacks" "golang.org/x/exp/maps" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflow3 "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/bizpkg/config/modelmgr" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" - crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge" + knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/nodes/llm/plugin.go b/backend/domain/workflow/internal/nodes/llm/plugin.go index f6a5b66e2..ebb35b612 100644 --- a/backend/domain/workflow/internal/nodes/llm/plugin.go +++ b/backend/domain/workflow/internal/nodes/llm/plugin.go @@ -21,7 +21,7 @@ import ( "github.com/cloudwego/eino/components/tool" "github.com/cloudwego/eino/schema" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" ) diff --git a/backend/domain/workflow/internal/nodes/plugin/exec.go b/backend/domain/workflow/internal/nodes/plugin/exec.go index 09d5875d6..23e4e41b7 100644 --- a/backend/domain/workflow/internal/nodes/plugin/exec.go +++ b/backend/domain/workflow/internal/nodes/plugin/exec.go @@ -21,11 +21,11 @@ import ( "github.com/cloudwego/eino/compose" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflow3 "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" entity2 "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/nodes/plugin/plugin.go b/backend/domain/workflow/internal/nodes/plugin/plugin.go index 2acba0989..965219b3d 100644 --- a/backend/domain/workflow/internal/nodes/plugin/plugin.go +++ b/backend/domain/workflow/internal/nodes/plugin/plugin.go @@ -24,7 +24,7 @@ import ( "github.com/cloudwego/eino/compose" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/convert" diff --git a/backend/domain/workflow/internal/nodes/receiver/input_receiver.go b/backend/domain/workflow/internal/nodes/receiver/input_receiver.go index 2c0e3714d..6bd3739dc 100644 --- a/backend/domain/workflow/internal/nodes/receiver/input_receiver.go +++ b/backend/domain/workflow/internal/nodes/receiver/input_receiver.go @@ -25,8 +25,8 @@ import ( "github.com/bytedance/sonic" "github.com/cloudwego/eino/compose" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflow0 "github.com/coze-dev/coze-studio/backend/api/model/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/nodes/utils.go b/backend/domain/workflow/internal/nodes/utils.go index bb04ca0c0..ac60a6d0c 100644 --- a/backend/domain/workflow/internal/nodes/utils.go +++ b/backend/domain/workflow/internal/nodes/utils.go @@ -26,7 +26,7 @@ import ( "github.com/cloudwego/eino/compose" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/workflow/internal/repo/conversation_repository.go b/backend/domain/workflow/internal/repo/conversation_repository.go index 85d75d947..248568414 100644 --- a/backend/domain/workflow/internal/repo/conversation_repository.go +++ b/backend/domain/workflow/internal/repo/conversation_repository.go @@ -24,7 +24,7 @@ import ( "gorm.io/gen" "gorm.io/gorm" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/repo/execute_history_store.go b/backend/domain/workflow/internal/repo/execute_history_store.go index e7542f626..8309b091e 100644 --- a/backend/domain/workflow/internal/repo/execute_history_store.go +++ b/backend/domain/workflow/internal/repo/execute_history_store.go @@ -25,7 +25,7 @@ import ( "gorm.io/gorm" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/repo/dal/model" diff --git a/backend/domain/workflow/internal/repo/repository.go b/backend/domain/workflow/internal/repo/repository.go index ed3f1be64..b972d321a 100644 --- a/backend/domain/workflow/internal/repo/repository.go +++ b/backend/domain/workflow/internal/repo/repository.go @@ -30,10 +30,10 @@ import ( "gorm.io/gen/field" "gorm.io/gorm" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflow3 "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/internal/schema/workflow_schema.go b/backend/domain/workflow/internal/schema/workflow_schema.go index b99d34b3f..f58f261eb 100644 --- a/backend/domain/workflow/internal/schema/workflow_schema.go +++ b/backend/domain/workflow/internal/schema/workflow_schema.go @@ -26,7 +26,7 @@ import ( "strings" "sync" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/pkg/logs" diff --git a/backend/domain/workflow/plugin/plugin.go b/backend/domain/workflow/plugin/plugin.go index b9f6ca949..3068d4413 100644 --- a/backend/domain/workflow/plugin/plugin.go +++ b/backend/domain/workflow/plugin/plugin.go @@ -26,13 +26,13 @@ import ( "golang.org/x/exp/maps" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common" workflow3 "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api" - "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api" + "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow" entity2 "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" diff --git a/backend/domain/workflow/service/as_tool_impl.go b/backend/domain/workflow/service/as_tool_impl.go index 004e731f6..5c8051a90 100644 --- a/backend/domain/workflow/service/as_tool_impl.go +++ b/backend/domain/workflow/service/as_tool_impl.go @@ -22,7 +22,7 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/service/conversation_impl.go b/backend/domain/workflow/service/conversation_impl.go index 53e08600d..dc2ef5db2 100644 --- a/backend/domain/workflow/service/conversation_impl.go +++ b/backend/domain/workflow/service/conversation_impl.go @@ -23,11 +23,11 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/conversation/common" conventity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/pkg/taskgroup" workflow2 "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation" + crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/service/executable_impl.go b/backend/domain/workflow/service/executable_impl.go index 9e8f7cacd..f53be814d 100644 --- a/backend/domain/workflow/service/executable_impl.go +++ b/backend/domain/workflow/service/executable_impl.go @@ -27,9 +27,9 @@ import ( einoCompose "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" workflowapimodel "github.com/coze-dev/coze-studio/backend/api/model/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/service/executable_impl_test.go b/backend/domain/workflow/service/executable_impl_test.go index 9a4e3ba70..662c7455d 100644 --- a/backend/domain/workflow/service/executable_impl_test.go +++ b/backend/domain/workflow/service/executable_impl_test.go @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" - crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message" - messagemock "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message/messagemock" + crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message" + messagemock "github.com/coze-dev/coze-studio/backend/crossdomain/message/messagemock" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" mock_workflow "github.com/coze-dev/coze-studio/backend/internal/mock/domain/workflow" "github.com/coze-dev/coze-studio/backend/pkg/lang/ptr" diff --git a/backend/domain/workflow/service/service_impl.go b/backend/domain/workflow/service/service_impl.go index 3263c6aae..f72de2283 100644 --- a/backend/domain/workflow/service/service_impl.go +++ b/backend/domain/workflow/service/service_impl.go @@ -28,10 +28,10 @@ import ( "golang.org/x/sync/errgroup" "gorm.io/gorm" - workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" cloudworkflow "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/application/base/ctxutil" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" + workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" "github.com/coze-dev/coze-studio/backend/domain/workflow" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" diff --git a/backend/domain/workflow/variable/variable_impl.go b/backend/domain/workflow/variable/variable_impl.go index 8cbd5fec7..9b428374d 100644 --- a/backend/domain/workflow/variable/variable_impl.go +++ b/backend/domain/workflow/variable/variable_impl.go @@ -25,10 +25,10 @@ import ( "github.com/bytedance/sonic" "github.com/cloudwego/eino/compose" - variablesModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory" "github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory" - crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables" + crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables" + variablesModel "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model" "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" "github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo" "github.com/coze-dev/coze-studio/backend/pkg/lang/ternary" diff --git a/backend/internal/mock/crossdomain/crossuser/crossuser.go b/backend/internal/mock/crossdomain/crossuser/crossuser.go index edd1ec494..8417a20fa 100644 --- a/backend/internal/mock/crossdomain/crossuser/crossuser.go +++ b/backend/internal/mock/crossdomain/crossuser/crossuser.go @@ -15,7 +15,7 @@ import ( gomock "go.uber.org/mock/gomock" - crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user" + crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user" ) // MockUser is a mock of User interface. diff --git a/backend/internal/mock/domain/plugin/interface.go b/backend/internal/mock/domain/plugin/interface.go index 1680e722e..0862428b4 100644 --- a/backend/internal/mock/domain/plugin/interface.go +++ b/backend/internal/mock/domain/plugin/interface.go @@ -29,7 +29,7 @@ import ( context "context" reflect "reflect" - model "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + model "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" dto "github.com/coze-dev/coze-studio/backend/domain/plugin/dto" entity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity" gomock "go.uber.org/mock/gomock" diff --git a/backend/internal/mock/domain/workflow/interface.go b/backend/internal/mock/domain/workflow/interface.go index 498384189..c0f95a8c7 100644 --- a/backend/internal/mock/domain/workflow/interface.go +++ b/backend/internal/mock/domain/workflow/interface.go @@ -31,7 +31,7 @@ import ( compose "github.com/cloudwego/eino/compose" schema "github.com/cloudwego/eino/schema" - workflow "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow" + workflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model" workflow0 "github.com/coze-dev/coze-studio/backend/api/model/workflow" "github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder" workflow1 "github.com/coze-dev/coze-studio/backend/domain/workflow" diff --git a/backend/types/ddl/gen_orm_query.go b/backend/types/ddl/gen_orm_query.go index cc4e47d8d..1905ce0c4 100644 --- a/backend/types/ddl/gen_orm_query.go +++ b/backend/types/ddl/gen_orm_query.go @@ -33,10 +33,10 @@ import ( "github.com/coze-dev/coze-studio/backend/api/model/admin/config" "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common" "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" - "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database" "github.com/coze-dev/coze-studio/backend/api/model/playground" - plugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model" + agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model" + database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model" + plugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model" appEntity "github.com/coze-dev/coze-studio/backend/domain/app/entity" variableEntity "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity" )