CloudSessionCloudSessionOptionsCloudLoadSessionOptions
Implements: DevinClientCloudSessionCloudSessionOptionsCloudLoadSessionOptions
Properties
Type:
AgentRequestHandlerAnswer agent → client requests the SDK does not handle itself (anything
but session/request_permission). Without a handler — or when the
handler returns undefined — built-in defaults apply (diagnostics report
none) and other methods are declined with method not found.Type:
CognitionExtensionNotificationObserve connection-scoped _cognition.ai/* notifications — those without
a sessionId (or one that matches no tracked session), e.g.
mcp/serversChanged and plugins/changed. Session-scoped notifications
go to the owning session’s onExtension instead.Methods
[asyncDispose]()
await using devin = … closes the client at scope exit, once the connection has shut down.
Returns
Promise<void>
assertNotOpen()
Parameters
attach()
replay: "none" unless overridden).
Parameters
Returns
CloudSession
attachTo()
ws if the
handshake fails.
Parameters
Returns
CloudDevin
close()
closePullRequest()
github.com/owner/repo/pull/123).
Parameters
Returns
PrCloseResponse
closeSession()
session/close): the
agent cancels any turn this client started and stops sending it updates.
On v1 agents this only releases the session locally.
Parameters
Returns
Promise<void>
connect()
initialize handshake.
Parameters
Returns
CloudDevin
createSecret()
Parameters
Returns
SecretCreateResponse
createSession()
orgId and repos are applied to the pending session
before that (in one request when both are given).
Parameters
Returns
CloudSession
extNotify()
_cognition.ai/* notification (no response).
Parameters
Type: one of
-
CognitionRequestParams unknown
extRequest()
_cognition.ai/* request. Typed when the method
is in the generated registry (CognitionAgentResponseMap); any other
_cognition.ai/* method is accepted untyped. For session-scoped methods
prefer AcpSession.extRequest, which fills in the session id.
Parameters
Type: one of
-
CognitionRequestParams unknown
Returns
CognitionRequestResult | Promise<T>
handshake()
Parameters
Returns
InitializeResult
launchSession()
turn.accepted,
not the turn’s outcome. Cancel explicitly with session.cancel().
Startup errors after creation preserve sessionId; never retry blindly.
Parameters
Returns
LaunchedSessionCloudSession | LaunchedSessionCloudSession | LaunchedSessionCloudSession
listSessions()
cursor.
Parameters
Returns
SessionInfo
listSessionsPage()
Parameters
Returns
CloudSessionsPage
loadSession()
devin-…). On ACP v2 this is
session/resume (with replayFrom chosen by options.replay); on v1 it
is session/load, which always replays the whole transcript.
Parameters
Returns
LoadedCloudSession
mcpServers()
Parameters
Returns
McpServer
mergePullRequest()
prPath is github.com/owner/repo/pull/123.
Parameters
Returns
PrMergeResponse
openSession()
session/new follow-ups such as choosing the model or organization). A
failing request releases the session and surfaces as a
SessionStartupError carrying the allocated id.
Parameters
Returns
CloudSession
pullRequestMergeStatus()
github.com/owner/repo/pull/123).
Parameters
Returns
PrMergeStatusResponse
releaseSession()
Parameters
resumeSession()
session/update notifications before load settles;
those are captured and returned instead of being delivered live. Refuses
a session that is already open on this client, since loading it again
would steal its notification routing.
Parameters
Returns
LoadedSessionCloudSession
supports()
cognition.ai/* capability, e.g.
devin.supports("cognition.ai/sessionRename") before calling
session.rename().
Parameters
Returns
boolean

