feat: 完善两阶段 Agent 自进化 Pipeline、Skills 与 Benchmark (#129)

This commit is contained in:
Jingzhe Xu
2026-07-30 15:59:58 +08:00
committed by GitHub
parent 3bd0a7208a
commit 081fe2d172
34 changed files with 2093 additions and 763 deletions
+39
View File
@@ -21,6 +21,7 @@ import type {
ApprovalDecisionRequest,
AuthLoginRequest,
AuthResponse,
BenchmarkCasesResponse,
BenchmarksResponse,
DirListResponse,
FilesStatRequest,
@@ -522,6 +523,44 @@ export const listBenchmarks = (projectId: string, agentId: string) =>
`/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}/benchmarks`,
);
export const listBenchmarkCases = (projectId: string, agentId: string, benchmarkId: string) =>
apiFetch<BenchmarkCasesResponse>(
`/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}` +
`/benchmarks/${encodeURIComponent(benchmarkId)}/cases`,
);
export const listBenchmarkCaseFiles = (
projectId: string,
agentId: string,
benchmarkId: string,
caseId: string,
path: string,
) =>
apiFetch<WorkspaceFilesResponse>(
`/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}` +
`/benchmarks/${encodeURIComponent(benchmarkId)}/cases/${encodeURIComponent(caseId)}/files`,
{ query: { path } },
);
export const benchmarkCaseFileUrl = (
projectId: string,
agentId: string,
benchmarkId: string,
caseId: string,
path: string,
options?: { download?: boolean; preview?: boolean },
): string => {
const base =
`/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}` +
`/benchmarks/${encodeURIComponent(benchmarkId)}/cases/${encodeURIComponent(caseId)}` +
`/files/content?path=${encodeURIComponent(path)}`;
return (
base +
(options?.download ? "&download=1" : "") +
(options?.preview && !options.download ? "&preview=1" : "")
);
};
// Agent State snapshot export / import ------------------------------------------------------
/** Snapshot bundle (tar.gz) download URL: the server sets Content-Disposition attachment, usable directly in <a download>. */