MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / createSession

Function createSession

packages/server/test/auth.e2e.test.ts:119–130  ·  view source on GitHub ↗
(r: RunningServer)

Source from the content-addressed store, hash-verified

117}
118
119async function createSession(r: RunningServer): Promise<string> {
120 const res = await appOf(r).inject({
121 method: 'POST',
122 url: '/api/v1/sessions',
123 payload: { metadata: { cwd: join(tmpDir, 'workspace') } },
124 });
125 const env = envelopeOf<{ id: string }>(res.json());
126 if (env.code !== 0 || env.data === null) {
127 throw new Error(`create session failed: ${JSON.stringify(env)}`);
128 }
129 return env.data.id;
130}
131
132/* -------------------------------------------------------------------- */
133/* GET /v1/auth — readiness snapshot */

Callers 1

auth.e2e.test.tsFile · 0.70

Calls 4

injectMethod · 0.80
jsonMethod · 0.80
appOfFunction · 0.70
envelopeOfFunction · 0.70

Tested by

no test coverage detected