调整项目结构
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,8 +10,6 @@ data/
|
|||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dashscope_key.txt
|
|
||||||
deepseek_key.txt
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
.env.*
|
.env.*
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ npm --prefix client run test -- --run
|
|||||||
npm --prefix client run build
|
npm --prefix client run build
|
||||||
```
|
```
|
||||||
|
|
||||||
产品、数据库与验收设计见 [docs](docs/)。标准 Skill 源文件位于 [标准Skills](标准Skills/),仅作为开发素材保留,不参与应用启动同步。
|
产品、数据库与验收设计见 [docs](docs/)。内置 Skill 与资源由 Flyway 种子迁移写入数据库,无需额外导入文件。
|
||||||
|
|||||||
1
dashscope_key.txt
Normal file
1
dashscope_key.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sk-ws-H.EPYDEHX.hEpq.MEYCIQCvMQg2IhYKPVDB76hcNSvgbVVQ_npnqH6s2cRjiniBKAIhAN1UmUSUg6fiJLhYt3rJXONC6YrC7BlfzYd-FPqrIiD9
|
||||||
1
deepseek_key.txt
Normal file
1
deepseek_key.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sk-8d1419754bce4306bc99854ee5ccd505
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>cn.alphaline</groupId>
|
<groupId>tech.easyflow</groupId>
|
||||||
<artifactId>ManuAgent-server</artifactId>
|
<artifactId>ManuAgent-server</artifactId>
|
||||||
<version>0.1.0-SNAPSHOT</version>
|
<version>0.1.0</version>
|
||||||
<name>Smart Factory Approval Agent</name>
|
<name>ManuAgent</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.alphaline.smartfactory;
|
package tech.easyflow.manuagent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
@@ -10,7 +10,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableConfigurationProperties(AppProperties.class)
|
@EnableConfigurationProperties(AppProperties.class)
|
||||||
public class SmartFactoryApplication {
|
public class ManuAgentApplication {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动 Spring Boot 应用。
|
* 启动 Spring Boot 应用。
|
||||||
@@ -18,7 +18,7 @@ public class SmartFactoryApplication {
|
|||||||
* @param args 命令行参数
|
* @param args 命令行参数
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(SmartFactoryApplication.class, args);
|
SpringApplication.run(ManuAgentApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import cn.alphaline.smartfactory.project.ProjectService;
|
import tech.easyflow.manuagent.project.ProjectService;
|
||||||
import cn.alphaline.smartfactory.skill.SkillService;
|
import tech.easyflow.manuagent.skill.SkillService;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import cn.alphaline.smartfactory.model.ModelService;
|
import tech.easyflow.manuagent.model.ModelService;
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.agentscope.core.agui.adapter.AguiAdapterConfig;
|
import io.agentscope.core.agui.adapter.AguiAdapterConfig;
|
||||||
import io.agentscope.core.agui.adapter.AguiAgentAdapter;
|
import io.agentscope.core.agui.adapter.AguiAgentAdapter;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.artifact.ArtifactService;
|
import tech.easyflow.manuagent.artifact.ArtifactService;
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import cn.alphaline.smartfactory.project.ProjectService;
|
import tech.easyflow.manuagent.project.ProjectService;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.project.ProjectService;
|
import tech.easyflow.manuagent.project.ProjectService;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.boot.ApplicationRunner;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.artifact;
|
package tech.easyflow.manuagent.artifact;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.artifact;
|
package tech.easyflow.manuagent.artifact;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.alphaline.smartfactory.artifact;
|
package tech.easyflow.manuagent.artifact;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.auth;
|
package tech.easyflow.manuagent.auth;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.auth;
|
package tech.easyflow.manuagent.auth;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.boot.ApplicationRunner;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.common;
|
package tech.easyflow.manuagent.common;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.common;
|
package tech.easyflow.manuagent.common;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.common;
|
package tech.easyflow.manuagent.common;
|
||||||
|
|
||||||
import jakarta.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.common;
|
package tech.easyflow.manuagent.common;
|
||||||
|
|
||||||
import jakarta.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import jakarta.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.config;
|
package tech.easyflow.manuagent.config;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.config;
|
package tech.easyflow.manuagent.config;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.config;
|
package tech.easyflow.manuagent.config;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiError;
|
import tech.easyflow.manuagent.common.ApiError;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.config;
|
package tech.easyflow.manuagent.config;
|
||||||
|
|
||||||
import io.agentscope.core.skill.repository.postgresql.PostgresSkillRepository;
|
import io.agentscope.core.skill.repository.postgresql.PostgresSkillRepository;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.model;
|
package tech.easyflow.manuagent.model;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.model;
|
package tech.easyflow.manuagent.model;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.alphaline.smartfactory.model;
|
package tech.easyflow.manuagent.model;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.alphaline.smartfactory.project;
|
package tech.easyflow.manuagent.project;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.agent.AgentRunService;
|
import tech.easyflow.manuagent.agent.AgentRunService;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.alphaline.smartfactory.project;
|
package tech.easyflow.manuagent.project;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.alphaline.smartfactory.project;
|
package tech.easyflow.manuagent.project;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.skill;
|
package tech.easyflow.manuagent.skill;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.alphaline.smartfactory.skill;
|
package tech.easyflow.manuagent.skill;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import io.agentscope.core.skill.AgentSkill;
|
import io.agentscope.core.skill.AgentSkill;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
@@ -11,7 +11,6 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HexFormat;
|
import java.util.HexFormat;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.alphaline.smartfactory.skill;
|
package tech.easyflow.manuagent.skill;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import io.agentscope.core.skill.AgentSkill;
|
import io.agentscope.core.skill.AgentSkill;
|
||||||
import io.agentscope.core.skill.repository.postgresql.PostgresSkillRepository;
|
import io.agentscope.core.skill.repository.postgresql.PostgresSkillRepository;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: smart-factory-approval-agent
|
name: manu-agent
|
||||||
datasource:
|
datasource:
|
||||||
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:54330/smart_factory_agent}
|
url: jdbc:postgresql://localhost:54330/smart_factory_agent
|
||||||
username: ${SPRING_DATASOURCE_USERNAME:smart_factory}
|
username: smart_factory
|
||||||
password: ${SPRING_DATASOURCE_PASSWORD:smart_factory}
|
password: smart_factory
|
||||||
hikari:
|
hikari:
|
||||||
maximum-pool-size: 12
|
maximum-pool-size: 12
|
||||||
minimum-idle: 2
|
minimum-idle: 2
|
||||||
@@ -22,27 +22,27 @@ spring:
|
|||||||
default-property-inclusion: non_null
|
default-property-inclusion: non_null
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: ${SERVER_PORT:8080}
|
port: 8080
|
||||||
servlet:
|
servlet:
|
||||||
session:
|
session:
|
||||||
cookie:
|
cookie:
|
||||||
http-only: true
|
http-only: true
|
||||||
same-site: lax
|
same-site: lax
|
||||||
secure: ${SESSION_COOKIE_SECURE:false}
|
secure: false
|
||||||
|
|
||||||
app:
|
app:
|
||||||
data-root: ${APP_DATA_ROOT:file:../data}
|
data-root: file:../data
|
||||||
deepseek-key-file: ${DEEPSEEK_KEY_FILE:./deepseek_key.txt}
|
deepseek-key-file: ./deepseek_key.txt
|
||||||
dashscope-key-file: ${DASHSCOPE_KEY_FILE:./dashscope_key.txt}
|
dashscope-key-file: ./dashscope_key.txt
|
||||||
master-key: ${APP_MASTER_KEY:smart-factory-local-master-key}
|
master-key: smart-factory-local-master-key
|
||||||
admin-username: ${APP_ADMIN_USERNAME:admin}
|
admin-username: admin
|
||||||
admin-password: ${APP_ADMIN_PASSWORD:admin123}
|
admin-password: admin123
|
||||||
model-base-url: ${APP_MODEL_BASE_URL:https://api.deepseek.com}
|
model-base-url: https://api.deepseek.com
|
||||||
model-id: ${APP_MODEL_ID:deepseek-v4-flash}
|
model-id: deepseek-v4-flash
|
||||||
model-context-window: ${APP_MODEL_CONTEXT_WINDOW:131072}
|
model-context-window: 131072
|
||||||
sandbox-image: ${APP_SANDBOX_IMAGE:smart-factory-agent-runtime:0.1.0}
|
sandbox-image: smart-factory-agent-runtime:0.1.0
|
||||||
sandbox-network: ${APP_SANDBOX_NETWORK:bridge}
|
sandbox-network: bridge
|
||||||
run-timeout: ${APP_RUN_TIMEOUT:60m}
|
run-timeout: 60m
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
pattern:
|
pattern:
|
||||||
|
|||||||
55145
server/src/main/resources/db/migration/V2__seed_skills.sql
Normal file
55145
server/src/main/resources/db/migration/V2__seed_skills.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
placeholderReplacement=false
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
package cn.alphaline.smartfactory;
|
package tech.easyflow.manuagent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.agent.AgentEventService;
|
import tech.easyflow.manuagent.agent.AgentEventService;
|
||||||
import cn.alphaline.smartfactory.artifact.ArtifactService;
|
import tech.easyflow.manuagent.artifact.ArtifactService;
|
||||||
import cn.alphaline.smartfactory.artifact.DocxValidator;
|
import tech.easyflow.manuagent.artifact.DocxValidator;
|
||||||
import cn.alphaline.smartfactory.project.ProjectService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
import tech.easyflow.manuagent.project.ProjectService;
|
||||||
|
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
@@ -212,7 +213,7 @@ class DatabaseAndEventIntegrationTest {
|
|||||||
""").param("id", UUID.randomUUID()).param("projectId", projectId).param("runId", runId)
|
""").param("id", UUID.randomUUID()).param("projectId", projectId).param("runId", runId)
|
||||||
.param("sha", "0".repeat(64)).update();
|
.param("sha", "0".repeat(64)).update();
|
||||||
|
|
||||||
ProjectService service = new ProjectService(jdbc, mock(cn.alphaline.smartfactory.auth.UserService.class), new ObjectMapper());
|
ProjectService service = new ProjectService(jdbc, mock(UserService.class), new ObjectMapper());
|
||||||
service.delete(projectId);
|
service.delete(projectId);
|
||||||
|
|
||||||
for (String table : List.of("agent_event", "artifact", "project_plan", "project_file", "agent_run")) {
|
for (String table : List.of("agent_event", "artifact", "project_plan", "project_file", "agent_run")) {
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.alphaline.smartfactory;
|
package tech.easyflow.manuagent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import cn.alphaline.smartfactory.model.KeyCipher;
|
import tech.easyflow.manuagent.model.KeyCipher;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.agent;
|
package tech.easyflow.manuagent.agent;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.mockito.ArgumentMatchers.any;
|
import static org.mockito.ArgumentMatchers.any;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.alphaline.smartfactory.artifact;
|
package tech.easyflow.manuagent.artifact;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.ApiException;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.auth;
|
package tech.easyflow.manuagent.auth;
|
||||||
|
|
||||||
import static org.mockito.ArgumentMatchers.any;
|
import static org.mockito.ArgumentMatchers.any;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
@@ -7,7 +7,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.common.GlobalExceptionHandler;
|
import tech.easyflow.manuagent.common.GlobalExceptionHandler;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.common;
|
package tech.easyflow.manuagent.common;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||||
|
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
package cn.alphaline.smartfactory.project;
|
package tech.easyflow.manuagent.project;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
import cn.alphaline.smartfactory.auth.UserService;
|
import tech.easyflow.manuagent.auth.UserService;
|
||||||
import cn.alphaline.smartfactory.config.AppProperties;
|
import tech.easyflow.manuagent.common.ApiException;
|
||||||
|
import tech.easyflow.manuagent.config.AppProperties;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
@@ -66,9 +67,9 @@ class ProjectFileServiceTest {
|
|||||||
ProjectFileService service = service();
|
ProjectFileService service = service();
|
||||||
|
|
||||||
assertThatThrownBy(() -> service.normalizeUploadPath("../企业材料.pdf", "企业材料.pdf"))
|
assertThatThrownBy(() -> service.normalizeUploadPath("../企业材料.pdf", "企业材料.pdf"))
|
||||||
.isInstanceOf(cn.alphaline.smartfactory.common.ApiException.class);
|
.isInstanceOf(ApiException.class);
|
||||||
assertThatThrownBy(() -> service.normalizeUploadPath("其他文件.pdf", "企业材料.pdf"))
|
assertThatThrownBy(() -> service.normalizeUploadPath("其他文件.pdf", "企业材料.pdf"))
|
||||||
.isInstanceOf(cn.alphaline.smartfactory.common.ApiException.class);
|
.isInstanceOf(ApiException.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.alphaline.smartfactory.skill;
|
package tech.easyflow.manuagent.skill;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
Reference in New Issue
Block a user