MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / makeCtx

Function makeCtx

test/release-notes.test.ts:10–20  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

8import type { ToolContext } from '../src/tools/base.js';
9
10function makeCtx(cwd: string): ToolContext {
11 return {
12 cwd,
13 sessionId: 'test',
14 transaction: {} as any,
15 permissions: { check: () => ({ ok: true }) } as any,
16 askUser: async () => 'allow',
17 signal: new AbortController().signal,
18 emit: () => {},
19 } as ToolContext;
20}
21
22function gitSetup(cwd: string, args: string[]): void {
23 const r = spawnSync('git', args, { cwd, encoding: 'utf-8' });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected