agentic-flow-kit 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/modules/hosts/omp/agents/implementer.md +45 -6
- package/modules/hosts/omp/agents/independent-reviewer.md +42 -5
- package/modules/hosts/omp/agents/ui-verifier.md +41 -6
- package/modules/hosts/opencode/agents/implementer.md +45 -1
- package/modules/hosts/opencode/agents/independent-reviewer.md +42 -1
- package/modules/hosts/opencode/agents/ui-verifier.md +41 -1
- package/modules/hosts/opencode/commands/build.md +55 -7
- package/modules/hosts/opencode/commands/deploy.md +51 -6
- package/modules/hosts/opencode/commands/design.md +34 -6
- package/modules/hosts/opencode/commands/maintain.md +71 -6
- package/modules/hosts/opencode/commands/new-task.md +59 -6
- package/modules/hosts/opencode/commands/plan.md +32 -6
- package/modules/hosts/opencode/commands/review.md +40 -6
- package/modules/hosts/opencode/commands/test.md +56 -8
- package/modules/hosts/trae/agents/implementer.md +44 -2
- package/modules/hosts/trae/agents/independent-reviewer.md +42 -1
- package/modules/hosts/trae/agents/ui-verifier.md +39 -3
- package/modules/hosts/trae/commands/wf-build.md +55 -7
- package/modules/hosts/trae/commands/wf-deploy.md +51 -6
- package/modules/hosts/trae/commands/wf-design.md +34 -6
- package/modules/hosts/trae/commands/wf-maintain.md +71 -6
- package/modules/hosts/trae/commands/wf-new-task.md +59 -6
- package/modules/hosts/trae/commands/wf-plan.md +32 -6
- package/modules/hosts/trae/commands/wf-review.md +40 -6
- package/modules/hosts/trae/commands/wf-test.md +56 -7
- package/modules/hosts/zcode/agents/implementer.md +45 -6
- package/modules/hosts/zcode/agents/independent-reviewer.md +42 -5
- package/modules/hosts/zcode/agents/ui-verifier.md +41 -5
- package/package.json +6 -3
- package/src/cli.mjs +15 -2
- package/src/doctor.mjs +140 -13
- package/src/init.test.mjs +25 -2
- package/src/pack.test.mjs +24 -0
- package/src/run-tests.mjs +4 -11
- package/src/sync-hosts.mjs +193 -0
- package/src/sync-hosts.test.mjs +170 -0
- package/src/sync.mjs +1 -0
- package/src/sync.test.mjs +10 -0
- package/templates/AGENTS.md +2 -2
- package/templates/_agents/commands/build.md +20 -0
- package/templates/_agents/commands/design.md +1 -0
- package/templates/_agents/commands/gate-checklist.md +91 -0
- package/templates/_agents/commands/maintain.md +1 -1
- package/templates/_agents/commands/plan.md +2 -1
- package/templates/_agents/commands/review.md +1 -0
- package/templates/_agents/commands/source-sync-check.md +103 -0
- package/templates/_agents/commands/sync-hosts.md +79 -0
- package/templates/_agents/commands/test.md +2 -1
- package/templates/_agents/notes/runtime-env.md +1 -1
- package/templates/_agents/rule-budgets.txt +1 -1
- package/templates/_agents/scripts/check-loop.mjs +517 -0
- package/templates/_agents/scripts/check-loop.sh +5 -808
- package/templates/_agents/scripts/check-loop.test.mjs +481 -0
- package/templates/_agents/scripts/doctor.test.mjs +298 -0
- package/templates/_agents/scripts/ensure-board.mjs +158 -0
- package/templates/_agents/scripts/fill-intent.mjs +59 -0
- package/templates/_agents/scripts/fill-intent.test.mjs +73 -0
- package/templates/_agents/scripts/fill-plan.mjs +60 -0
- package/templates/_agents/scripts/fill-plan.test.mjs +67 -0
- package/templates/_agents/scripts/fill-spec.mjs +52 -0
- package/templates/_agents/scripts/fill-spec.test.mjs +61 -0
- package/templates/_agents/scripts/gate-checklist.mjs +192 -0
- package/templates/_agents/scripts/gate-checklist.test.mjs +204 -0
- package/templates/_agents/scripts/gen-workflow-index.mjs +4 -2
- package/templates/_agents/scripts/kb-search.mjs +3 -1
- package/templates/_agents/scripts/source-sync-check.mjs +131 -0
- package/templates/_agents/scripts/source-sync-check.test.mjs +156 -0
- package/templates/_agents/scripts/verify.mjs +8 -10
- package/templates/_agents/scripts/verify.test.mjs +13 -1
- package/templates/_agents/scripts/wf-journal.mjs +158 -0
- package/templates/_agents/scripts/wf-journal.test.mjs +150 -0
- package/templates/_agents/scripts/workflow-board-server.mjs +18 -10
- package/templates/_agents/scripts/workflow-enums.mjs +68 -0
- package/templates/_agents/scripts/workflow-enums.test.mjs +110 -0
- package/templates/_agents/scripts/workflows-check.mjs +260 -0
- package/templates/_agents/scripts/workflows-check.test.mjs +267 -0
- package/templates/_agents/workflow-enums.txt +19 -0
- package/templates/_agents/workflows/_TEMPLATE.md +74 -0
- package/templates/_agents/workflows/pipeline-closing.md +29 -0
- package/templates/_agents/workflows/source-sync-repair.md +30 -0
- package/templates/_agents/workflows/steps//347/244/272/344/276/213-/351/203/250/347/275/262/351/252/214/350/257/201.md +10 -0
- package/templates/_agents/workflows//347/244/272/344/276/213-/345/271/266/350/241/214/345/256/236/347/216/260/350/257/204/345/256/241.md +16 -0
- package/templates/workflow/README.md +2 -2
- package/templates/_agents/cache/kb-index.json +0 -1
- package/templates/_agents/scripts/check-loop.test.sh +0 -1042
- package/templates/_agents/scripts/ensure-board.ps1 +0 -48
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# ensure-board.ps1 — workflow 看板按需手动拉起(默认不自动开启;只起不关:Windows 重启即天然回收,无需 stop/status)
|
|
2
|
-
# 行为:探活(端口占用者须响应 /api/board 才认定为看板,否则不动手、报占用者并 exit 1)
|
|
3
|
-
# → 前端或服务端任一代码早于进程 = 旧代码自动 kill 重启 → 全新启动成功后弹浏览器(重启/已运行不弹,SSE 自动重连)
|
|
4
|
-
# 用法:powershell -NoProfile -File .agents/scripts/ensure-board.ps1 [-Port 8933] [-NoOpen]
|
|
5
|
-
param(
|
|
6
|
-
[int]$Port = 8933,
|
|
7
|
-
[switch]$NoOpen
|
|
8
|
-
)
|
|
9
|
-
$ErrorActionPreference = 'Stop'
|
|
10
|
-
$agentsDir = Split-Path -Parent $PSScriptRoot
|
|
11
|
-
$server = Join-Path $PSScriptRoot 'workflow-board-server.mjs'
|
|
12
|
-
$boardHtml = Join-Path $agentsDir 'board\index.html'
|
|
13
|
-
$codeFiles = @($boardHtml, $server) # 前端 + 服务端:任一更新都算「旧代码」
|
|
14
|
-
$url = "http://127.0.0.1:$Port"
|
|
15
|
-
|
|
16
|
-
$proc = $null
|
|
17
|
-
$conn = Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
18
|
-
if ($conn) { $proc = Get-Process -Id $conn.OwningProcess -ErrorAction SilentlyContinue }
|
|
19
|
-
|
|
20
|
-
$action = 'fresh start'
|
|
21
|
-
if ($proc) {
|
|
22
|
-
# 身份校验:只有能返回带 cards 字段 JSON 的才是看板,否则绝不 kill(可能误杀用户自己的服务)
|
|
23
|
-
$isBoard = $false
|
|
24
|
-
try {
|
|
25
|
-
$body = (Invoke-WebRequest -Uri "$url/api/board" -TimeoutSec 2).Content
|
|
26
|
-
$isBoard = $null -ne ($body | ConvertFrom-Json).PSObject.Properties['cards']
|
|
27
|
-
} catch { $isBoard = $false }
|
|
28
|
-
if (-not $isBoard) {
|
|
29
|
-
Write-Output "board: 端口 $Port 被非看板进程占用(pid $($proc.Id) $($proc.ProcessName)),未做任何改动;请确认该进程后自行处理"
|
|
30
|
-
exit 1
|
|
31
|
-
}
|
|
32
|
-
$newest = ($codeFiles | ForEach-Object { (Get-Item $_).LastWriteTime } | Sort-Object -Descending)[0]
|
|
33
|
-
$stale = $newest -gt $proc.StartTime.AddSeconds(2)
|
|
34
|
-
if (-not $stale) {
|
|
35
|
-
Write-Output "board: already up-to-date at $url (pid $($proc.Id))"
|
|
36
|
-
exit 0
|
|
37
|
-
}
|
|
38
|
-
Stop-Process -Id $proc.Id -Force
|
|
39
|
-
Start-Sleep -Milliseconds 500
|
|
40
|
-
$action = 'restarted (stale code detected)'
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
Start-Process -FilePath 'node' -ArgumentList "`"$server`" --port $Port" -WindowStyle Hidden
|
|
44
|
-
$deadline = (Get-Date).AddSeconds(8)
|
|
45
|
-
do { Start-Sleep -Milliseconds 300; $up = [bool](Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue) } while (-not $up -and (Get-Date) -lt $deadline)
|
|
46
|
-
if (-not $up) { Write-Output "board: FAILED to start on $Port"; exit 1 }
|
|
47
|
-
Write-Output "board: $action -> $url"
|
|
48
|
-
if (-not $NoOpen -and $action -eq 'fresh start') { Start-Process $url }
|