refactor(workflow): Move domain resources events into the application layer (#729)

This commit is contained in:
Ryo
2025-08-13 21:06:56 +08:00
committed by GitHub
parent 8c3ae99643
commit 5d98e8ef93
47 changed files with 661 additions and 761 deletions

View File

@@ -26,6 +26,7 @@ import (
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin"
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
@@ -88,7 +89,7 @@ func (pr *toolPreCallConf) toolPreRetrieve(ctx context.Context, ar *AgentRequest
logs.CtxErrorf(ctx, "Failed to unmarshal json arguments: %s", item.Arguments)
return nil, err
}
execResp, _, err := crossworkflow.DefaultSVC().SyncExecuteWorkflow(ctx, plugin.ExecuteConfig{
execResp, _, err := crossworkflow.DefaultSVC().SyncExecuteWorkflow(ctx, workflowModel.ExecuteConfig{
ID: item.PluginID,
ConnectorID: ar.Identity.ConnectorID,
ConnectorUID: ar.UserID,

View File

@@ -20,7 +20,7 @@ import (
"context"
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
"github.com/coze-dev/coze-studio/backend/domain/workflow"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
@@ -37,7 +37,7 @@ func newWorkflowTools(ctx context.Context, conf *workflowConfig) ([]workflow.Too
id := info.GetWorkflowId()
policies = append(policies, &vo.GetPolicy{
ID: id,
QType: plugin.FromLatestVersion,
QType: workflowModel.FromLatestVersion,
})
}