* Launch a new session from an existing Agent Config. The config already * holds the manifest and its resolved credentials, so this carries no * spec of its own — which is what makes "run this agent" a single call. * The new session starts PROVISIONING, not READY.
(configId, name)
| 286 | * The new session starts PROVISIONING, not READY. |
| 287 | */ |
| 288 | async createSessionFromConfig(configId, name) { |
| 289 | const body = await request("POST", SESSIONS_PATH, { |
| 290 | body: { name, config_id: configId }, |
| 291 | timeoutMs: CREATE_SESSION_TIMEOUT_MS, |
| 292 | }); |
| 293 | return body?.session ?? null; |
| 294 | }, |
| 295 | |
| 296 | async pauseSession(sessionId) { |
| 297 | await request("POST", `${SESSIONS_PATH}/${sessionId}/pause`); |