MCPcopy Create free account
hub / github.com/AI45Lab/Code / makeSession

Function makeSession

sdk/node/test_session_close.mjs:31–37  ·  view source on GitHub ↗
(sessionId)

Source from the content-addressed store, hash-verified

29const agent = await mod.Agent.create(inlineConfig)
30
31function makeSession(sessionId) {
32 return agent.session(workspace, {
33 sessionId,
34 permissionPolicy: { defaultDecision: 'allow' },
35 workspaceBackend: new mod.LocalWorkspaceBackend(workspace),
36 })
37}
38
39// 1. Fresh session: isClosed is false; agent.listSessions sees it.
40const sessionA = makeSession('node-close-1')

Callers 1

Calls 1

sessionMethod · 0.45

Tested by

no test coverage detected