chore: 工作台产品化进行中的改动
把工作区里其余在制品一并入库,主要是工作台产品化的推进:
后端:新增 capability_definition / project / my_app_center / office_skill
接口与 action_definition / skill_definition / project / user_app_center
模型,config 加路由健康上报。
前端:新增 frontend/src/skills(Office 技能与 workbuddy 复刻)、
项目管理、应用中心、能力目录页,以及配套 api / store / config;
聊天侧新增 SpecialistChip / SpecialistPanel / SkillStrip / AppChatRail
等组件。
清理:移除旧 views/tools 下的单页工具(已并入工作台)、_frozen 冻结组件、
cmd/inspect_oa_debug 调试入口,以及两份调试笔记。
其它:文档与启动脚本同步。
(这批改动与上一提交的 SY23 工作并行进行,此前已在同一工作区内交织。)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ param(
|
||||
[switch]$SkipSmoke,
|
||||
[switch]$SkipBackendBuild,
|
||||
[switch]$SkipFrontendInstall,
|
||||
[switch]$SkipKnowledgeService,
|
||||
[string]$BindHost = "127.0.0.1"
|
||||
)
|
||||
|
||||
@@ -13,12 +12,10 @@ $ErrorActionPreference = "Stop"
|
||||
|
||||
$BackendPort = 10232
|
||||
$FrontendPort = 10231
|
||||
$KnowledgeServicePort = 10233
|
||||
$RepoDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$AppDir = Join-Path $RepoDir "eai_agentplatform"
|
||||
$BackendDir = Join-Path $AppDir "backend-go"
|
||||
$FrontendDir = Join-Path $AppDir "frontend"
|
||||
$KnowledgeServiceDir = Join-Path $AppDir "knowledge_service"
|
||||
$BackendBin = Join-Path $BackendDir "bin\eai_agentplatform-server.exe"
|
||||
$DebugLogDir = Join-Path $RepoDir "debuglog"
|
||||
$null = New-Item -ItemType Directory -Force -Path $DebugLogDir
|
||||
@@ -28,13 +25,10 @@ $BackendLog = Join-Path $DebugLogDir "backend_$RunId.log"
|
||||
$BackendErrLog = Join-Path $DebugLogDir "backend_$RunId.err.log"
|
||||
$FrontendLog = Join-Path $DebugLogDir "frontend_$RunId.log"
|
||||
$FrontendErrLog = Join-Path $DebugLogDir "frontend_$RunId.err.log"
|
||||
$KnowledgeLog = Join-Path $DebugLogDir "knowledge_$RunId.log"
|
||||
$KnowledgeErrLog = Join-Path $DebugLogDir "knowledge_$RunId.err.log"
|
||||
$BackendPidFile = Join-Path $DebugLogDir "backend.pid"
|
||||
$FrontendPidFile = Join-Path $DebugLogDir "frontend.pid"
|
||||
$KnowledgePidFile = Join-Path $DebugLogDir "knowledge.pid"
|
||||
|
||||
$KnownProcessNames = @("eai_agentplatform-server", "node", "npm", "npm.cmd", "python", "python3")
|
||||
$KnownProcessNames = @("eai_agentplatform-server", "node", "npm", "npm.cmd")
|
||||
$StartedProcesses = @()
|
||||
|
||||
function Write-Step {
|
||||
@@ -161,7 +155,6 @@ try {
|
||||
Write-Host (" repo : {0}" -f $RepoDir)
|
||||
Write-Host (" backend : {0} (port {1})" -f $BackendDir, $BackendPort)
|
||||
Write-Host (" frontend : {0} (port {1})" -f $FrontendDir, $FrontendPort)
|
||||
Write-Host (" knowledge: {0} (port {1})" -f $KnowledgeServiceDir, $KnowledgeServicePort)
|
||||
Write-Host (" bind host: {0}" -f $BindHost)
|
||||
|
||||
if (-not $SkipPreflight) {
|
||||
@@ -171,10 +164,6 @@ try {
|
||||
if (-not (Test-CommandExists "go")) { throw "Missing go on PATH." }
|
||||
if (-not (Test-CommandExists "node")) { throw "Missing node on PATH." }
|
||||
if (-not (Test-CommandExists "npm.cmd")) { throw "Missing npm on PATH." }
|
||||
if (-not $SkipKnowledgeService) {
|
||||
if (-not (Test-CommandExists "python")) { throw "Missing python on PATH." }
|
||||
if (-not (Test-Path $KnowledgeServiceDir)) { throw ("Missing knowledge service directory: {0}" -f $KnowledgeServiceDir) }
|
||||
}
|
||||
Write-Host " [OK] Preflight passed"
|
||||
} else {
|
||||
Write-Step "Preflight skipped"
|
||||
@@ -211,29 +200,10 @@ try {
|
||||
}
|
||||
|
||||
Write-Step "Check ports"
|
||||
if (-not $SkipKnowledgeService) {
|
||||
Resolve-Port -Port $KnowledgeServicePort -Label "knowledge service"
|
||||
}
|
||||
Resolve-Port -Port $BackendPort -Label "backend"
|
||||
Resolve-Port -Port $FrontendPort -Label "frontend"
|
||||
|
||||
Write-Step "Launch services"
|
||||
if (-not $SkipKnowledgeService) {
|
||||
$env:KNOWLEDGE_SERVICE_URL = ("http://127.0.0.1:{0}" -f $KnowledgeServicePort)
|
||||
$env:KNOWLEDGE_INDEX_DIR = Join-Path $BackendDir "data\faiss"
|
||||
if (-not $env:KNOWLEDGE_BERT_MODEL) {
|
||||
$env:KNOWLEDGE_BERT_MODEL = "bert-base-chinese"
|
||||
}
|
||||
$knowledgeProc = Start-TrackedProcess `
|
||||
-FilePath "python" `
|
||||
-WorkingDirectory $KnowledgeServiceDir `
|
||||
-ArgumentList @("-m", "uvicorn", "main:app", "--host", "127.0.0.1", "--port", [string]$KnowledgeServicePort) `
|
||||
-StdoutPath $KnowledgeLog `
|
||||
-StderrPath $KnowledgeErrLog
|
||||
Set-Content -Path $KnowledgePidFile -Value $knowledgeProc.Id
|
||||
Wait-Http -Url ("http://127.0.0.1:{0}/health" -f $KnowledgeServicePort) -Label "knowledge service"
|
||||
}
|
||||
|
||||
$env:PORT = [string]$BackendPort
|
||||
$backendProc = Start-TrackedProcess `
|
||||
-FilePath $BackendBin `
|
||||
@@ -281,13 +251,7 @@ try {
|
||||
Write-Host ("Backend err : {0}" -f $BackendErrLog)
|
||||
Write-Host ("Frontend log : {0}" -f $FrontendLog)
|
||||
Write-Host ("Frontend err : {0}" -f $FrontendErrLog)
|
||||
if (-not $SkipKnowledgeService) {
|
||||
Write-Host ("Knowledge log: {0}" -f $KnowledgeLog)
|
||||
Write-Host ("Knowledge err: {0}" -f $KnowledgeErrLog)
|
||||
Write-Host ("PIDs : knowledge={0} backend={1} frontend={2}" -f $knowledgeProc.Id, $backendProc.Id, $frontendProc.Id)
|
||||
} else {
|
||||
Write-Host ("PIDs : backend={0} frontend={1}" -f $backendProc.Id, $frontendProc.Id)
|
||||
}
|
||||
Write-Host ("PIDs : backend={0} frontend={1}" -f $backendProc.Id, $frontendProc.Id)
|
||||
Write-Host ""
|
||||
Write-Host "Examples:" -ForegroundColor Yellow
|
||||
Write-Host " powershell -ExecutionPolicy Bypass -File .\start_dev_10231_10232.ps1"
|
||||
|
||||
Reference in New Issue
Block a user