MCPcopy Index your code
hub / github.com/coder/mux / createTestToolConfig

Function createTestToolConfig

src/node/services/tools/testHelpers.ts:391–411  ·  view source on GitHub ↗
(
  tempDir: string,
  options?: {
    workspaceId?: string;
    sessionsDir?: string;
    runtime?: Runtime;
    muxScope?: MuxToolScope;
  }
)

Source from the content-addressed store, hash-verified

389}
390
391export function createTestToolConfig(
392 tempDir: string,
393 options?: {
394 workspaceId?: string;
395 sessionsDir?: string;
396 runtime?: Runtime;
397 muxScope?: MuxToolScope;
398 }
399): ToolConfiguration {
400 return {
401 cwd: tempDir,
402 workspaceSessionDir: options?.sessionsDir ?? tempDir,
403 runtime: options?.runtime ?? new LocalRuntime(tempDir),
404 runtimeTempDir: tempDir,
405 workspaceId: options?.workspaceId ?? "test-workspace",
406 muxScope: options?.muxScope ?? {
407 type: "global",
408 muxHome: tempDir,
409 },
410 };
411}
412
413export function getTestDeps() {
414 return {

Callers 15

aiService.test.tsFile · 0.90
notify.test.tsFile · 0.90
createToolConfigFunction · 0.90
executeFunction · 0.90
createTestWebFetchToolFunction · 0.90

Calls

no outgoing calls

Tested by 15

createToolConfigFunction · 0.72
executeFunction · 0.72
createTestWebFetchToolFunction · 0.72
createTestAttachFileToolFunction · 0.72
createTestFileReadToolFunction · 0.72
createFixtureFunction · 0.72
createReadToolFunction · 0.72
createWriteToolFunction · 0.72
createWriteToolFunction · 0.72
createTestBashToolFunction · 0.72