MCPcopy Create free account
hub / github.com/53AI/53AIHub / runtimeSessionForContext

Function runtimeSessionForContext

api/service/tools/sandbox_runtime_executor.go:199–216  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

197}
198
199func runtimeSessionForContext(ctx context.Context) (*sandboxruntime.Session, error) {
200 rt, err := getSandboxRuntime()
201 if err != nil {
202 return nil, err
203 }
204 spec := buildRuntimeSessionSpec(ctx)
205 session, err := rt.Acquire(ctx, spec)
206 if err != nil {
207 return nil, err
208 }
209 if err := ensureSandboxRuntimeSessionSeeded(ctx, session); err != nil {
210 return nil, err
211 }
212 if err := primeSandboxOutputSnapshot(ctx, session.Mounts.WorkspaceRoot); err != nil {
213 logger.Warnf(ctx, "Failed to prime sandbox output snapshot: session=%s, err=%v", session.ID, err)
214 }
215 return session, nil
216}
217
218func runtimeWriteFiles(ctx context.Context, session *sandboxruntime.Session, files []sandboxruntime.FileObject) error {
219 rt, err := getSandboxRuntime()

Calls 6

getSandboxRuntimeFunction · 0.85
buildRuntimeSessionSpecFunction · 0.85
WarnfMethod · 0.80
AcquireMethod · 0.65

Tested by

no test coverage detected