init project
This commit is contained in:
Vendored
+77
@@ -0,0 +1,77 @@
|
||||
import path from 'node:path';
|
||||
function resolveWorkspaceRoot() {
|
||||
const fromEnv = process.env.WORKSPACE_ROOT;
|
||||
const raw = fromEnv && fromEnv.trim().length > 0 ? fromEnv : process.cwd();
|
||||
return path.resolve(raw);
|
||||
}
|
||||
export const config = {
|
||||
/** Absolute path every tool call is confined to. */
|
||||
workspaceRoot: resolveWorkspaceRoot(),
|
||||
/** HTTP transport settings (only used by transports/http.ts). */
|
||||
httpHost: process.env.MCP_HTTP_HOST ?? '127.0.0.1',
|
||||
httpPort: Number.parseInt(process.env.MCP_HTTP_PORT ?? '3939', 10),
|
||||
httpToken: process.env.MCP_HTTP_TOKEN,
|
||||
/** Binaries the server is ever allowed to spawn. Basenames only (extension-insensitive). */
|
||||
allowedBinaries: [
|
||||
'npm',
|
||||
'pnpm',
|
||||
'yarn',
|
||||
'bun',
|
||||
'node',
|
||||
'npx',
|
||||
'git',
|
||||
'php',
|
||||
'composer',
|
||||
'powershell',
|
||||
'sh',
|
||||
'bash',
|
||||
// Composer vendor/bin tools invoked by the Laravel/CodeIgniter adapters.
|
||||
// These are only ever resolved to a path inside the detected project's
|
||||
// own vendor/bin directory (see PhpFrameworkAdapter.vendorBin), never
|
||||
// taken verbatim from tool-call input.
|
||||
'phpunit',
|
||||
'pest',
|
||||
'pint',
|
||||
'phpcs',
|
||||
'phpcbf',
|
||||
// Docker CLI used by docker_compose_up/down.
|
||||
'docker',
|
||||
// Lighthouse CLI used by lighthouse_audit (also invokable via npx).
|
||||
'lighthouse',
|
||||
// v1.4 adapters: Django / Rails tooling.
|
||||
'python',
|
||||
'pip',
|
||||
'poetry',
|
||||
'uv',
|
||||
'ruby',
|
||||
'bundle',
|
||||
'rails',
|
||||
'gem',
|
||||
],
|
||||
/** Hard caps to keep tool output/process usage bounded. */
|
||||
maxBufferedLogLines: 2000,
|
||||
maxToolOutputChars: 20_000,
|
||||
defaultCommandTimeoutMs: 120_000,
|
||||
scaffoldCommandTimeoutMs: 5 * 60_000,
|
||||
defaultReadyTimeoutMs: 30_000,
|
||||
maxConcurrentProcesses: 10,
|
||||
/** Docker-specific guardrails. */
|
||||
dockerAllowedBaseImages: [
|
||||
'node',
|
||||
'nginx',
|
||||
'postgres',
|
||||
'redis',
|
||||
'mysql',
|
||||
'mariadb',
|
||||
'mongo',
|
||||
'php',
|
||||
'composer',
|
||||
'python',
|
||||
'alpine',
|
||||
'busybox',
|
||||
],
|
||||
maxConcurrentContainers: 10,
|
||||
defaultContainerMemory: '512m',
|
||||
defaultContainerCpus: '1.0',
|
||||
};
|
||||
//# sourceMappingURL=config.js.map
|
||||
Reference in New Issue
Block a user