chore: remove legacy startup paths
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user