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

Function writeGlobalRules

services/cloud-agent-next/src/session-service.ts:855–866  ·  view source on GitHub ↗
(
  sandbox: SandboxInstance,
  sessionHome: string,
  sessionId: string
)

Source from the content-addressed store, hash-verified

853 sandbox: SandboxInstance,
854 session: ExecutionSession,
855 sessionHome: string,
856 kilocodeToken: string
857): Promise<string> {
858 const tokenPath = getRestoreTokenFilePath(sessionHome);
859 const tokenDir = dirname(tokenPath);
860
861 await timedExec(session, `mkdir -p ${shellQuote(tokenDir)}`, 'session.restoreTokenFile.mkdir');
862 await sandbox.writeFile(tokenPath, kilocodeToken);
863 await timedExec(session, `chmod 600 ${shellQuote(tokenPath)}`, 'session.restoreTokenFile.chmod');
864
865 return tokenPath;
866}
867
868async function cleanupRestoreTokenFile(
869 session: ExecutionSession,

Callers 2

prepareWorkspaceMethod · 0.85

Calls 3

timedExecFunction · 0.85
buildCloudAgentRulesFunction · 0.85
writeFileMethod · 0.45

Tested by

no test coverage detected