chore: remove legacy startup paths

This commit is contained in:
2026-04-03 13:45:57 +08:00
parent 2027635efe
commit dc0b250adc
36 changed files with 598 additions and 1923 deletions

View File

@@ -133,10 +133,7 @@ function buildRunScopedAgentPath(runId, agentId, suffix = '') {
return `/runs/${encodeURIComponent(runId)}/agents/${encodeURIComponent(agentId)}${suffix}`;
}
/**
* Runtime agent routes use `/runs/{run_id}/agents/...`.
* Legacy `/workspaces/...` routes are deprecated but remain for backward compatibility.
*/
/** Runtime agent routes use `/runs/{run_id}/agents/...`. */
export function fetchAgentProfile(runId, agentId) {
return safeFetch(CONTROL_API_BASE, buildRunScopedAgentPath(runId, agentId, '/profile'));
}

View File

@@ -20,7 +20,7 @@ describe('runtimeApi run-scoped agent routes', () => {
await fetchAgentProfile('20260330_123000', 'portfolio_manager');
expect(fetchMock).toHaveBeenCalledWith(
expect.stringContaining('/workspaces/20260330_123000/agents/portfolio_manager/profile')
expect.stringContaining('/runs/20260330_123000/agents/portfolio_manager/profile')
);
});
@@ -35,7 +35,7 @@ describe('runtimeApi run-scoped agent routes', () => {
await updateAgentWorkspaceFile('20260330_123000', 'risk_manager', 'MEMORY.md', '# demo');
expect(fetchMock).toHaveBeenCalledWith(
expect.stringContaining('/workspaces/20260330_123000/agents/risk_manager/files/MEMORY.md'),
expect.stringContaining('/runs/20260330_123000/agents/risk_manager/files/MEMORY.md'),
expect.objectContaining({
method: 'PUT',
body: '# demo'