MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createSandbox

Function createSandbox

services/cloud-agent-next/src/session-service.test.ts:288–306  ·  view source on GitHub ↗
(
  session: ExecutionSession,
  repoExists = false,
  writeFile = vi.fn().mockResolvedValue(undefined)
)

Source from the content-addressed store, hash-verified

286 sessionId: 'agent_web',
287 platform: 'github',
288 }),
289 env: reviewEnv(),
290 kiloCapability: 'kilo-token',
291 createdOnPlatform: 'cloud-agent-web',
292 profile: {
293 envVars: {
294 GH_TOKEN: 'profile-token',
295 KILO_GITHUB_REVIEW_TARGET: '{"forged":true}',
296 KILO_GITHUB_REVIEW_API_BASE: 'http://evil.example',
297 },
298 },
299 });
300
301 expect(runtimeEnv.GH_TOKEN).toBe('profile-token');
302 expect(runtimeEnv.KILO_GITHUB_REVIEW_TARGET).toBeUndefined();
303 expect(runtimeEnv.KILO_GITHUB_REVIEW_API_BASE).toBeUndefined();
304 });
305
306 it('removes a profile-supplied code_review MCP server and keeps other servers', () => {
307 const runtimeEnv = service().buildRuntimeEnv({
308 context: service().buildContext({
309 sandboxId: 'usr-test',

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected