feat: integrate task-bound REA research and portable runtime

This commit is contained in:
Agent Workbench Dev
2026-10-30 05:21:17 +08:00
parent 4d06618f62
commit 6a1ef125a0
66 changed files with 3081 additions and 54 deletions
+5
View File
@@ -24,6 +24,11 @@ export async function downloadArtifact(sessionId: string, artifactId: string, na
}
downloadBlob(await response.blob(), name);
}
export async function downloadResearchDocument(sessionId: string, jobId: string, kind: 'bundle' | 'raw' = 'bundle') {
const response = await fetch('/api/sessions/' + sessionId + '/research/jobs/' + jobId + '/download?kind=' + kind, { headers: { 'X-Workbench-Token': accessToken } });
if (!response.ok) { const value = await response.json().catch(() => ({})); throw new Error(value.error || '研究证据下载失败。'); }
downloadBlob(await response.blob(), 'agent-workbench-rea-' + kind + '-' + jobId + '.json');
}
export function downloadBlob(blob: Blob, name: string) {
const url = URL.createObjectURL(blob);
const link = document.createElement('a'); link.href = url; link.download = name; link.click();