mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 05:50:44 +08:00
重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。
本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。 Made-with: Cursor
This commit is contained in:
parent
ba3836f00f
commit
4a23b715a2
498 changed files with 2760 additions and 2200 deletions
|
|
@ -1,37 +1,13 @@
|
|||
param(
|
||||
[switch]$Background = $true
|
||||
[switch]$Background = $false
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Resolve-RepoRoot {
|
||||
$here = Split-Path -Parent $PSCommandPath
|
||||
return (Resolve-Path (Join-Path $here "..")).Path
|
||||
$real = Join-Path $PSScriptRoot "..\\runtime\\operations\\scripts\\start_wiki_worker.ps1"
|
||||
if (-not (Test-Path $real)) {
|
||||
throw "Forward script target not found: $real"
|
||||
}
|
||||
|
||||
$repoRoot = Resolve-RepoRoot
|
||||
$runDir = Join-Path $PSScriptRoot ".run"
|
||||
$null = New-Item -ItemType Directory -Force -Path $runDir -ErrorAction SilentlyContinue
|
||||
$pidFile = Join-Path $runDir "wiki_worker.pid"
|
||||
$outLog = Join-Path $runDir "wiki_worker.out.log"
|
||||
$errLog = Join-Path $runDir "wiki_worker.err.log"
|
||||
& $real -Background:$Background
|
||||
|
||||
$venvPython = Join-Path $repoRoot "oclaw/.venv/Scripts/python.exe"
|
||||
if (Test-Path $venvPython) {
|
||||
$pythonExe = $venvPython
|
||||
} else {
|
||||
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
|
||||
if (-not $pythonCmd) {
|
||||
throw "python not found in PATH"
|
||||
}
|
||||
$pythonExe = "python"
|
||||
}
|
||||
|
||||
if (-not $Background) {
|
||||
& $pythonExe -m src.wiki_worker.main
|
||||
exit 0
|
||||
}
|
||||
|
||||
$p = Start-Process -FilePath $pythonExe -ArgumentList @("-m", "src.wiki_worker.main") -WorkingDirectory $repoRoot -PassThru -WindowStyle Hidden -RedirectStandardOutput $outLog -RedirectStandardError $errLog
|
||||
Set-Content -Path $pidFile -Value $p.Id -Encoding ascii
|
||||
Write-Host "[ok] started wiki worker pid=$($p.Id) out=$outLog err=$errLog"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue