scope-agent-workbench 0.2.0 → 0.2.3
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/CHANGELOG.md +41 -0
- package/bridge/agent-email-relay.mjs +160 -160
- package/bridge/app-server-websocket-transport.mjs +219 -219
- package/bridge/archive/service.mjs +130 -130
- package/bridge/auth-profile-failover.mjs +58 -58
- package/bridge/auth-profile-manager.mjs +215 -215
- package/bridge/capacity-recovery.mjs +90 -90
- package/bridge/gpu-usage-history.mjs +322 -322
- package/bridge/local/history.mjs +20 -5
- package/bridge/plugins/aliyun-dlc/monitor.mjs +236 -236
- package/bridge/plugins/aliyun-dlc/probe.mjs +701 -701
- package/bridge/private-gateway.mjs +371 -371
- package/bridge/private-start.mjs +22 -22
- package/bridge/probes/app-server-handoff-probe.mjs +87 -87
- package/bridge/probes/app-server-writer-probe.mjs +69 -69
- package/bridge/probes/assistant-search-probe.mjs +321 -321
- package/bridge/probes/dialogue-probe.mjs +462 -462
- package/bridge/probes/history-probe.mjs +430 -345
- package/bridge/probes/new-session-preflight.mjs +14 -14
- package/bridge/probes/profile-cancel-probe.mjs +17 -17
- package/bridge/probes/profile-delete-probe.mjs +26 -26
- package/bridge/probes/profile-list-probe.mjs +114 -114
- package/bridge/probes/profile-write-probe.mjs +109 -109
- package/bridge/probes/raw-context-probe.mjs +51 -51
- package/bridge/probes/remote-probe.mjs +627 -626
- package/bridge/probes/submission-probe.mjs +2 -2
- package/bridge/probes/takeover-probe.mjs +326 -326
- package/bridge/probes/vscode-open-preflight.mjs +21 -21
- package/bridge/providers/claude-interactive.py +463 -341
- package/bridge/providers/cli-command.mjs +103 -103
- package/bridge/providers/conversations.mjs +231 -231
- package/bridge/providers/native-commands.py +38 -38
- package/bridge/providers/native-session-state.mjs +14 -14
- package/bridge/providers/native-session-state.py +96 -96
- package/bridge/providers/remote-job.py +130 -130
- package/bridge/remote-app-server-command.mjs +121 -121
- package/bridge/remote-directory-listing.mjs +148 -148
- package/bridge/rollout-summary.mjs +20 -2
- package/bridge/routes/dialogue.mjs +48 -3
- package/bridge/routes/models.mjs +312 -312
- package/bridge/server.mjs +3357 -3332
- package/bridge/session-attachments.mjs +150 -150
- package/bridge/session-catalog/agy-history.py +141 -2
- package/bridge/session-catalog/catalog.mjs +17 -0
- package/bridge/session-catalog/probe.py +1207 -331
- package/bridge/session-catalog/routes.mjs +6 -0
- package/bridge/start.mjs +205 -205
- package/bridge/state-persistence.mjs +9 -1
- package/bridge/tmux-session-control.mjs +29 -29
- package/bridge/vscode-opener.mjs +157 -157
- package/bridge/web-terminal.mjs +52 -52
- package/bridge/workbench/manager-context.mjs +51 -51
- package/bridge/workbench/service.mjs +301 -301
- package/dist/client/.vite/manifest.json +4 -4
- package/dist/client/assets/{index-Enu1x0PS.js → index-BMior55c.js} +2 -2
- package/dist/client/assets/{layout-segment-context-CmJzExWq.js → layout-segment-context-DjGudgXn.js} +1 -1
- package/dist/client/assets/page-CJqXlhDs.js +551 -0
- package/dist/client/assets/page-LYzRz6_S.css +1 -0
- package/dist/client/favicon.svg +6 -6
- package/dist/server/__vite_rsc_assets_manifest.js +8 -8
- package/dist/server/index.js +7 -7
- package/dist/server/ssr/__vite_rsc_assets_manifest.js +8 -8
- package/dist/server/ssr/assets/{page-CYYyCnKD.js → page-BB9Dri2u.js} +2416 -271
- package/dist/server/ssr/assets/page-LYzRz6_S.css +1 -0
- package/dist/server/ssr/index.js +1 -1
- package/dist/server/ssr/vinext-server.json +1 -1
- package/dist/server/vinext-server.json +1 -1
- package/dist/server/wrangler.json +1 -1
- package/lib/browser-snapshot-cache.js +53 -53
- package/lib/formula-preview.js +1 -1
- package/lib/incremental-snapshot.js +300 -300
- package/lib/markdown-math.js +151 -151
- package/lib/remote-links.js +95 -95
- package/lib/runtime-config.js +70 -70
- package/lib/session-filters.js +38 -38
- package/lib/ssh-config.js +26 -26
- package/lib/stable-order.js +39 -39
- package/lib/subagent-display-prefs.ts +130 -0
- package/package.json +1 -1
- package/scripts/agent-email-relay.mjs +104 -104
- package/scripts/email-notification-cli.mjs +28 -28
- package/scripts/enable-private-access.ps1 +109 -109
- package/scripts/fixtures/native-conversations.mjs +164 -6
- package/scripts/fixtures/workbench-conversations.mjs +475 -352
- package/scripts/preview-workbench.mjs +669 -669
- package/dist/client/assets/page-COBv6VWj.css +0 -1
- package/dist/client/assets/page-DVjU6VG_.js +0 -550
- package/dist/server/ssr/assets/page-COBv6VWj.css +0 -1
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
param(
|
|
2
|
-
[int]$GatewayPort = 4820
|
|
3
|
-
)
|
|
4
|
-
|
|
5
|
-
$ErrorActionPreference = "Stop"
|
|
6
|
-
$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
|
7
|
-
$StateFile = Join-Path $RepoRoot ".scope\private-access.json"
|
|
8
|
-
$UrlFile = Join-Path $RepoRoot ".scope\private-access-url.txt"
|
|
9
|
-
|
|
10
|
-
function Test-LocalHttp {
|
|
11
|
-
param(
|
|
12
|
-
[string]$Uri,
|
|
13
|
-
[int[]]$AcceptedStatus = @(200)
|
|
14
|
-
)
|
|
15
|
-
try {
|
|
16
|
-
$StatusCode = (Invoke-WebRequest -UseBasicParsing -Uri $Uri -TimeoutSec 2).StatusCode
|
|
17
|
-
return $AcceptedStatus -contains $StatusCode
|
|
18
|
-
} catch {
|
|
19
|
-
if ($_.Exception.Response) {
|
|
20
|
-
return $AcceptedStatus -contains [int]$_.Exception.Response.StatusCode
|
|
21
|
-
}
|
|
22
|
-
return $false
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
$TailscaleCommand = Get-Command "tailscale.exe" -ErrorAction SilentlyContinue
|
|
27
|
-
if (-not $TailscaleCommand) {
|
|
28
|
-
$Candidate = Join-Path $env:ProgramFiles "Tailscale\tailscale.exe"
|
|
29
|
-
if (Test-Path -LiteralPath $Candidate) {
|
|
30
|
-
$TailscaleCommand = Get-Item -LiteralPath $Candidate
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (-not $TailscaleCommand) {
|
|
34
|
-
throw "Tailscale is not installed. Install it on this PC and phone, sign both into your private tailnet, then rerun this script."
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
$TailscaleExe = $TailscaleCommand.Source
|
|
38
|
-
if (-not $TailscaleExe) {
|
|
39
|
-
$TailscaleExe = $TailscaleCommand.FullName
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
$Status = (& $TailscaleExe status --json | ConvertFrom-Json)
|
|
43
|
-
if (-not $Status.Self.Online) {
|
|
44
|
-
throw "Tailscale is installed but this PC is not online. Sign in first, then rerun this script."
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
$UiReady = Test-LocalHttp -Uri "http://127.0.0.1:3000/"
|
|
48
|
-
$BridgeReady = Test-LocalHttp -Uri "http://127.0.0.1:4815/api/snapshot"
|
|
49
|
-
if (-not $UiReady -and -not $BridgeReady) {
|
|
50
|
-
$NpmCommand = Get-Command "npm.cmd"
|
|
51
|
-
Start-Process `
|
|
52
|
-
-FilePath $NpmCommand.Source `
|
|
53
|
-
-ArgumentList @("run", "scope") `
|
|
54
|
-
-WorkingDirectory $RepoRoot `
|
|
55
|
-
-WindowStyle Hidden
|
|
56
|
-
for ($Attempt = 0; $Attempt -lt 20; $Attempt++) {
|
|
57
|
-
Start-Sleep -Milliseconds 750
|
|
58
|
-
$UiReady = Test-LocalHttp -Uri "http://127.0.0.1:3000/"
|
|
59
|
-
$BridgeReady = Test-LocalHttp -Uri "http://127.0.0.1:4815/api/snapshot"
|
|
60
|
-
if ($UiReady -and $BridgeReady) {
|
|
61
|
-
break
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (-not $UiReady -or -not $BridgeReady) {
|
|
66
|
-
throw "The Monitor UI and Bridge are not both healthy. Run 'npm run scope' and resolve any port conflict first."
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
$GatewayReady = Test-LocalHttp `
|
|
70
|
-
-Uri "http://127.0.0.1:$GatewayPort/" `
|
|
71
|
-
-AcceptedStatus @(401)
|
|
72
|
-
if (-not $GatewayReady) {
|
|
73
|
-
Start-Process `
|
|
74
|
-
-FilePath (Get-Command node.exe).Source `
|
|
75
|
-
-ArgumentList @("bridge/private-start.mjs") `
|
|
76
|
-
-WorkingDirectory $RepoRoot `
|
|
77
|
-
-WindowStyle Hidden
|
|
78
|
-
for ($Attempt = 0; $Attempt -lt 10; $Attempt++) {
|
|
79
|
-
Start-Sleep -Milliseconds 500
|
|
80
|
-
$GatewayReady = Test-LocalHttp `
|
|
81
|
-
-Uri "http://127.0.0.1:$GatewayPort/" `
|
|
82
|
-
-AcceptedStatus @(401)
|
|
83
|
-
if ($GatewayReady) {
|
|
84
|
-
break
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (-not $GatewayReady) {
|
|
89
|
-
throw "The private gateway did not become healthy on 127.0.0.1:$GatewayPort."
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
& $TailscaleExe serve --bg "http://127.0.0.1:$GatewayPort"
|
|
93
|
-
if ($LASTEXITCODE -ne 0) {
|
|
94
|
-
throw "tailscale serve failed with exit code $LASTEXITCODE"
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
$Status = (& $TailscaleExe status --json | ConvertFrom-Json)
|
|
98
|
-
$DnsName = [string]$Status.Self.DNSName
|
|
99
|
-
if (-not $DnsName) {
|
|
100
|
-
throw "Tailscale did not report a MagicDNS name."
|
|
101
|
-
}
|
|
102
|
-
$DnsName = $DnsName.TrimEnd(".")
|
|
103
|
-
$PrivateState = Get-Content -LiteralPath $StateFile -Raw | ConvertFrom-Json
|
|
104
|
-
$BootstrapUrl = "https://$DnsName/?token=$($PrivateState.token)"
|
|
105
|
-
Set-Content -LiteralPath $UrlFile -Value $BootstrapUrl -Encoding utf8
|
|
106
|
-
|
|
107
|
-
Write-Host "SCOPE is available inside your tailnet at https://$DnsName/"
|
|
108
|
-
Write-Host "The one-time bootstrap URL was written to $UrlFile"
|
|
109
|
-
Write-Host "Open that file locally and send the URL to your phone through a private channel."
|
|
1
|
+
param(
|
|
2
|
+
[int]$GatewayPort = 4820
|
|
3
|
+
)
|
|
4
|
+
|
|
5
|
+
$ErrorActionPreference = "Stop"
|
|
6
|
+
$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
|
7
|
+
$StateFile = Join-Path $RepoRoot ".scope\private-access.json"
|
|
8
|
+
$UrlFile = Join-Path $RepoRoot ".scope\private-access-url.txt"
|
|
9
|
+
|
|
10
|
+
function Test-LocalHttp {
|
|
11
|
+
param(
|
|
12
|
+
[string]$Uri,
|
|
13
|
+
[int[]]$AcceptedStatus = @(200)
|
|
14
|
+
)
|
|
15
|
+
try {
|
|
16
|
+
$StatusCode = (Invoke-WebRequest -UseBasicParsing -Uri $Uri -TimeoutSec 2).StatusCode
|
|
17
|
+
return $AcceptedStatus -contains $StatusCode
|
|
18
|
+
} catch {
|
|
19
|
+
if ($_.Exception.Response) {
|
|
20
|
+
return $AcceptedStatus -contains [int]$_.Exception.Response.StatusCode
|
|
21
|
+
}
|
|
22
|
+
return $false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$TailscaleCommand = Get-Command "tailscale.exe" -ErrorAction SilentlyContinue
|
|
27
|
+
if (-not $TailscaleCommand) {
|
|
28
|
+
$Candidate = Join-Path $env:ProgramFiles "Tailscale\tailscale.exe"
|
|
29
|
+
if (Test-Path -LiteralPath $Candidate) {
|
|
30
|
+
$TailscaleCommand = Get-Item -LiteralPath $Candidate
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (-not $TailscaleCommand) {
|
|
34
|
+
throw "Tailscale is not installed. Install it on this PC and phone, sign both into your private tailnet, then rerun this script."
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
$TailscaleExe = $TailscaleCommand.Source
|
|
38
|
+
if (-not $TailscaleExe) {
|
|
39
|
+
$TailscaleExe = $TailscaleCommand.FullName
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$Status = (& $TailscaleExe status --json | ConvertFrom-Json)
|
|
43
|
+
if (-not $Status.Self.Online) {
|
|
44
|
+
throw "Tailscale is installed but this PC is not online. Sign in first, then rerun this script."
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$UiReady = Test-LocalHttp -Uri "http://127.0.0.1:3000/"
|
|
48
|
+
$BridgeReady = Test-LocalHttp -Uri "http://127.0.0.1:4815/api/snapshot"
|
|
49
|
+
if (-not $UiReady -and -not $BridgeReady) {
|
|
50
|
+
$NpmCommand = Get-Command "npm.cmd"
|
|
51
|
+
Start-Process `
|
|
52
|
+
-FilePath $NpmCommand.Source `
|
|
53
|
+
-ArgumentList @("run", "scope") `
|
|
54
|
+
-WorkingDirectory $RepoRoot `
|
|
55
|
+
-WindowStyle Hidden
|
|
56
|
+
for ($Attempt = 0; $Attempt -lt 20; $Attempt++) {
|
|
57
|
+
Start-Sleep -Milliseconds 750
|
|
58
|
+
$UiReady = Test-LocalHttp -Uri "http://127.0.0.1:3000/"
|
|
59
|
+
$BridgeReady = Test-LocalHttp -Uri "http://127.0.0.1:4815/api/snapshot"
|
|
60
|
+
if ($UiReady -and $BridgeReady) {
|
|
61
|
+
break
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (-not $UiReady -or -not $BridgeReady) {
|
|
66
|
+
throw "The Monitor UI and Bridge are not both healthy. Run 'npm run scope' and resolve any port conflict first."
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
$GatewayReady = Test-LocalHttp `
|
|
70
|
+
-Uri "http://127.0.0.1:$GatewayPort/" `
|
|
71
|
+
-AcceptedStatus @(401)
|
|
72
|
+
if (-not $GatewayReady) {
|
|
73
|
+
Start-Process `
|
|
74
|
+
-FilePath (Get-Command node.exe).Source `
|
|
75
|
+
-ArgumentList @("bridge/private-start.mjs") `
|
|
76
|
+
-WorkingDirectory $RepoRoot `
|
|
77
|
+
-WindowStyle Hidden
|
|
78
|
+
for ($Attempt = 0; $Attempt -lt 10; $Attempt++) {
|
|
79
|
+
Start-Sleep -Milliseconds 500
|
|
80
|
+
$GatewayReady = Test-LocalHttp `
|
|
81
|
+
-Uri "http://127.0.0.1:$GatewayPort/" `
|
|
82
|
+
-AcceptedStatus @(401)
|
|
83
|
+
if ($GatewayReady) {
|
|
84
|
+
break
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (-not $GatewayReady) {
|
|
89
|
+
throw "The private gateway did not become healthy on 127.0.0.1:$GatewayPort."
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
& $TailscaleExe serve --bg "http://127.0.0.1:$GatewayPort"
|
|
93
|
+
if ($LASTEXITCODE -ne 0) {
|
|
94
|
+
throw "tailscale serve failed with exit code $LASTEXITCODE"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$Status = (& $TailscaleExe status --json | ConvertFrom-Json)
|
|
98
|
+
$DnsName = [string]$Status.Self.DNSName
|
|
99
|
+
if (-not $DnsName) {
|
|
100
|
+
throw "Tailscale did not report a MagicDNS name."
|
|
101
|
+
}
|
|
102
|
+
$DnsName = $DnsName.TrimEnd(".")
|
|
103
|
+
$PrivateState = Get-Content -LiteralPath $StateFile -Raw | ConvertFrom-Json
|
|
104
|
+
$BootstrapUrl = "https://$DnsName/?token=$($PrivateState.token)"
|
|
105
|
+
Set-Content -LiteralPath $UrlFile -Value $BootstrapUrl -Encoding utf8
|
|
106
|
+
|
|
107
|
+
Write-Host "SCOPE is available inside your tailnet at https://$DnsName/"
|
|
108
|
+
Write-Host "The one-time bootstrap URL was written to $UrlFile"
|
|
109
|
+
Write-Host "Open that file locally and send the URL to your phone through a private channel."
|
|
@@ -3,24 +3,133 @@ const isEn = process.env.SCOPE_PREVIEW_LOCALE === "en";
|
|
|
3
3
|
const now = Date.now();
|
|
4
4
|
const claudeSubagents = [
|
|
5
5
|
{
|
|
6
|
-
id: "sub-lit-1",
|
|
6
|
+
id: "agent-sub-lit-1",
|
|
7
|
+
agentId: "agent-sub-lit-1",
|
|
7
8
|
role: "Literature & Baseline Auditor",
|
|
8
|
-
typeName: "
|
|
9
|
+
typeName: "Explore",
|
|
10
|
+
model: "claude-sonnet",
|
|
11
|
+
spawnDepth: 1,
|
|
9
12
|
background: true,
|
|
10
13
|
status: "working",
|
|
11
|
-
lastAction: "
|
|
14
|
+
lastAction: "Grep: tab:zeroshot-pixels",
|
|
15
|
+
hasWorkflow: true,
|
|
12
16
|
updatedAt: now - 4000,
|
|
13
17
|
},
|
|
14
18
|
{
|
|
15
|
-
id: "sub-eval-2",
|
|
19
|
+
id: "agent-sub-eval-2",
|
|
20
|
+
agentId: "agent-sub-eval-2",
|
|
16
21
|
role: "Checkpoint Metrics Collector",
|
|
17
22
|
typeName: "general-purpose",
|
|
23
|
+
model: "claude-opus",
|
|
24
|
+
spawnDepth: 1,
|
|
18
25
|
background: true,
|
|
19
|
-
status: "
|
|
20
|
-
lastAction: "
|
|
26
|
+
status: "completed",
|
|
27
|
+
lastAction: "SubagentHandback",
|
|
28
|
+
hasWorkflow: true,
|
|
21
29
|
updatedAt: now - 1500,
|
|
22
30
|
},
|
|
23
31
|
];
|
|
32
|
+
|
|
33
|
+
const claudeSubagentWorkflows = {
|
|
34
|
+
"agent-sub-lit-1": {
|
|
35
|
+
found: true,
|
|
36
|
+
provider: "claude",
|
|
37
|
+
subagentId: "agent-sub-lit-1",
|
|
38
|
+
role: "Literature & Baseline Auditor",
|
|
39
|
+
typeName: "Explore",
|
|
40
|
+
model: "claude-sonnet",
|
|
41
|
+
spawnDepth: 1,
|
|
42
|
+
status: "working",
|
|
43
|
+
version: "preview-wf-1",
|
|
44
|
+
truncated: false,
|
|
45
|
+
totalSteps: 4,
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
id: "wf1-prompt",
|
|
49
|
+
kind: "prompt",
|
|
50
|
+
text: isEn
|
|
51
|
+
? "Cross-check all four visual manipulation baselines in `paper/sections/experiments.tex` against `eval_metrics.py` and verify every citation label."
|
|
52
|
+
: "核对 `paper/sections/experiments.tex` 中四组视觉操作基线与 `eval_metrics.py` 的统计口径,并检查所有引用标签。",
|
|
53
|
+
timestamp: new Date(now - 24000).toISOString(),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "wf1-think",
|
|
57
|
+
kind: "thinking",
|
|
58
|
+
durationMs: 1850,
|
|
59
|
+
text: isEn
|
|
60
|
+
? "First locate `tab:zeroshot-pixels` in the LaTeX source, then compare the reported success rates and VRAM numbers with the evaluation script output."
|
|
61
|
+
: "先在 LaTeX 源码中定位 `tab:zeroshot-pixels`,再逐项比对评测脚本导出的成功率与显存峰值。",
|
|
62
|
+
timestamp: new Date(now - 21000).toISOString(),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "wf1-tool-1",
|
|
66
|
+
kind: "tool",
|
|
67
|
+
toolName: "Grep",
|
|
68
|
+
summary: "tab:zeroshot-pixels",
|
|
69
|
+
inputPreview: JSON.stringify({ pattern: "tab:zeroshot-pixels", path: "paper/sections" }, null, 2),
|
|
70
|
+
output: "paper/sections/experiments.tex:48: \\label{tab:zeroshot-pixels}\npaper/sections/experiments.tex:61: Baseline & 66.2 & 41.8 \\\\\npaper/sections/experiments.tex:63: \\method{} & \\textbf{92.8} & \\textbf{27.6} \\\\",
|
|
71
|
+
status: "completed",
|
|
72
|
+
timestamp: new Date(now - 15000).toISOString(),
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "wf1-tool-2",
|
|
76
|
+
kind: "tool",
|
|
77
|
+
toolName: "Read",
|
|
78
|
+
summary: "/workspace/research/eval_metrics.py",
|
|
79
|
+
inputPreview: JSON.stringify({ file_path: "/workspace/research/eval_metrics.py", offset: 18, limit: 30 }, null, 2),
|
|
80
|
+
output: "18: def aggregate_seeds(runs):\n19: # Mean over all 5 evaluation seeds (0..4)\n20: return mean(r.success_rate for r in runs)",
|
|
81
|
+
status: "running",
|
|
82
|
+
timestamp: new Date(now - 4000).toISOString(),
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
"agent-sub-eval-2": {
|
|
87
|
+
found: true,
|
|
88
|
+
provider: "claude",
|
|
89
|
+
subagentId: "agent-sub-eval-2",
|
|
90
|
+
role: "Checkpoint Metrics Collector",
|
|
91
|
+
typeName: "general-purpose",
|
|
92
|
+
model: "claude-opus",
|
|
93
|
+
spawnDepth: 1,
|
|
94
|
+
status: "completed",
|
|
95
|
+
version: "preview-wf-2",
|
|
96
|
+
truncated: false,
|
|
97
|
+
totalSteps: 4,
|
|
98
|
+
steps: [
|
|
99
|
+
{
|
|
100
|
+
id: "wf2-prompt",
|
|
101
|
+
kind: "prompt",
|
|
102
|
+
text: isEn
|
|
103
|
+
? "Run `eval_metrics.py --summary` across the 4× A100 checkpoints and hand back a verified comparison table."
|
|
104
|
+
: "在 4× A100 最新 checkpoint 上运行 `eval_metrics.py --summary` 并回传核对后的对比表格。",
|
|
105
|
+
timestamp: new Date(now - 42000).toISOString(),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "wf2-tool-1",
|
|
109
|
+
kind: "tool",
|
|
110
|
+
toolName: "Bash",
|
|
111
|
+
summary: "python3 eval_metrics.py --summary --seeds 0,1,2,3,4",
|
|
112
|
+
command: "python3 eval_metrics.py --summary --seeds 0,1,2,3,4",
|
|
113
|
+
output: "Loaded 5 seeds from /workspace/research/runs/latest\nBaseline: 66.2% (peak 41.8 GB)\nCosine LR: 79.5% (peak 38.2 GB)\nSCOPE Policy: 92.8% (peak 27.6 GB, -34.0% VRAM)",
|
|
114
|
+
status: "completed",
|
|
115
|
+
timestamp: new Date(now - 26000).toISOString(),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "wf2-handback",
|
|
119
|
+
kind: "tool",
|
|
120
|
+
toolName: "SubagentHandback",
|
|
121
|
+
summary: isEn ? "Verified 5-seed metrics & 34% VRAM reduction" : "已核实 5 个随机种子指标及 34% 显存下降",
|
|
122
|
+
inputPreview: JSON.stringify({
|
|
123
|
+
summary: isEn
|
|
124
|
+
? "All 5 seeds match [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45):\n\n| Variant | Success (%) | Peak VRAM (GB) |\n| --- | ---: | ---: |\n| Baseline | 66.2 | 41.8 |\n| **SCOPE Policy** | **92.8** | **27.6** |\n\nVerified reduction: $\\Delta_{\\text{VRAM}} = (41.8 - 27.6) / 41.8 = 34.0\\%$."
|
|
125
|
+
: "5 组随机种子结果已与 [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45) 一致:\n\n| 实验方案 | 成功率 (%) | 显存峰值 (GB) |\n| --- | ---: | ---: |\n| Baseline | 66.2 | 41.8 |\n| **SCOPE Policy** | **92.8** | **27.6** |\n\n显存降幅验证:$\\Delta_{\\text{VRAM}} = (41.8 - 27.6) / 41.8 = 34.0\\%$。",
|
|
126
|
+
}),
|
|
127
|
+
status: "completed",
|
|
128
|
+
timestamp: new Date(now - 5000).toISOString(),
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
};
|
|
24
133
|
const agySubagents = [
|
|
25
134
|
{
|
|
26
135
|
id: "agy-sub-1",
|
|
@@ -211,6 +320,17 @@ export function nativeConversationFixture(request, response, url, json) {
|
|
|
211
320
|
});
|
|
212
321
|
return true;
|
|
213
322
|
}
|
|
323
|
+
if (url.pathname === "/api/session-catalog/subagent-workflow") {
|
|
324
|
+
const subId = url.searchParams.get("subagentId") || "";
|
|
325
|
+
const workflow =
|
|
326
|
+
claudeSubagentWorkflows[subId] || Object.values(claudeSubagentWorkflows)[0];
|
|
327
|
+
if (!workflow) {
|
|
328
|
+
json(response, 404, { error: "Subagent workflow not found" });
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
json(response, 200, workflow);
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
214
334
|
if (url.pathname === "/api/session-catalog/dialogue") {
|
|
215
335
|
const isClaude = (url.searchParams.get("key") || "").includes('"claude"');
|
|
216
336
|
const isAgy = (url.searchParams.get("key") || "").includes('"antigravity"');
|
|
@@ -275,6 +395,25 @@ export function nativeConversationFixture(request, response, url, json) {
|
|
|
275
395
|
role: "user",
|
|
276
396
|
text: "Audit the four visual baseline benchmarks, preserve formulas and citations, and spawn background subagents to verify the latest checkpoints.",
|
|
277
397
|
},
|
|
398
|
+
{
|
|
399
|
+
id: "subgrp-1",
|
|
400
|
+
role: "subagent_group",
|
|
401
|
+
text: "",
|
|
402
|
+
taskTitle: "Audit visual baselines & checkpoints",
|
|
403
|
+
turnIndex: 1,
|
|
404
|
+
subagents: claudeSubagents,
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "handback-1",
|
|
408
|
+
role: "agent_interaction",
|
|
409
|
+
direction: "inbound",
|
|
410
|
+
interactionKind: "handback",
|
|
411
|
+
peerId: "agent-sub-eval-2",
|
|
412
|
+
peerName: "Checkpoint Metrics Collector",
|
|
413
|
+
subagentId: "agent-sub-eval-2",
|
|
414
|
+
summary: "Verified 5-seed metrics & 34% VRAM reduction across all 4 benchmarks",
|
|
415
|
+
text: "Verified 5-seed checkpoints: **SCOPE Policy** reaches **92.8%** success rate with **27.6 GB** peak VRAM (-34.0% vs baseline).",
|
|
416
|
+
},
|
|
278
417
|
{
|
|
279
418
|
id: "2",
|
|
280
419
|
role: "assistant",
|
|
@@ -287,6 +426,25 @@ export function nativeConversationFixture(request, response, url, json) {
|
|
|
287
426
|
role: "user",
|
|
288
427
|
text: "核对四组视觉基线评测指标,保留公式和原始引用,并并行启动后台子代理检查最新 checkpoint。",
|
|
289
428
|
},
|
|
429
|
+
{
|
|
430
|
+
id: "subgrp-1",
|
|
431
|
+
role: "subagent_group",
|
|
432
|
+
text: "",
|
|
433
|
+
taskTitle: "核对视觉基线指标与最新 checkpoint",
|
|
434
|
+
turnIndex: 1,
|
|
435
|
+
subagents: claudeSubagents,
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "handback-1",
|
|
439
|
+
role: "agent_interaction",
|
|
440
|
+
direction: "inbound",
|
|
441
|
+
interactionKind: "handback",
|
|
442
|
+
peerId: "agent-sub-eval-2",
|
|
443
|
+
peerName: "Checkpoint Metrics Collector",
|
|
444
|
+
subagentId: "agent-sub-eval-2",
|
|
445
|
+
summary: "已核实 5 个随机种子指标,显存峰值较基线下降 34%",
|
|
446
|
+
text: "已完成 5 组随机种子核验:**SCOPE Policy** 成功率 **92.8%**,峰值显存 **27.6 GB**(较基线下降 34.0%)。",
|
|
447
|
+
},
|
|
290
448
|
{
|
|
291
449
|
id: "2",
|
|
292
450
|
role: "assistant",
|