config.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pluginConfigSchematics = void 0;
const sdk_1 = require("@lmstudio/sdk");
exports.pluginConfigSchematics = (0, sdk_1.createConfigSchematics)()
// Workspace
.field("workspacePath", "string", {
displayName: "Workspace Path",
subtitle: "All file operations are sandboxed to this directory. Leave blank to use the current working directory.",
}, "")
// Python interpreter
.field("pythonInterpreter", "string", {
displayName: "Python Interpreter",
subtitle: "Conda env name (e.g. 'misc'), full path to a python binary " +
"(e.g. '/Volumes/personal/conda_envs/misc/bin/python'), or leave blank to use system python3.",
}, "")
// Execution toggles (dangerous — opt-in)
.field("allowShellCommands", "boolean", {
displayName: "Allow Shell Commands",
subtitle: "Enable run_command. DANGER: executes arbitrary shell commands on your machine.",
}, false)
.field("allowPythonExecution", "boolean", {
displayName: "Allow Python Execution",
subtitle: "Enable run_python_code and run_python_file. Code runs on your machine.",
}, false)
.field("allowCppCompilation", "boolean", {
displayName: "Allow C++ Compilation & Execution",
subtitle: "Enable compile_cpp, compile_and_run, cmake_build. Runs compiled binaries on your machine.",
}, false)
.field("allowPipInstall", "boolean", {
displayName: "Allow pip install",
subtitle: "Enable pip_install to install Python packages into the current environment.",
}, false)
// Git
.field("allowGitWrite", "boolean", {
displayName: "Allow Git Write Operations",
subtitle: "Enable git_stage and git_commit (read-only git tools always enabled).",
}, true)
// C++ compiler preference
.field("preferClang", "boolean", {
displayName: "Prefer Clang over GCC",
subtitle: "Use clang++ instead of g++ when both are available.",
}, true)
// Timeouts
.field("commandTimeoutSeconds", "numeric", {
int: true, min: 5, max: 300,
displayName: "Command Timeout (seconds)",
subtitle: "Maximum time a shell/compile/run command may take.",
slider: { min: 5, max: 300, step: 5 },
}, 60)
// ── Agent Zero ────────────────────────────────────────────────────────────
// Sub-agent model
.field("subAgentModelId", "string", {
displayName: "Sub-Agent Model ID",
subtitle: "Model identifier to use for sub-agents (e.g. 'lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF'). " +
"Leave blank to reuse the currently active model — recommended for low-RAM devices.",
}, "")
.field("lmStudioEndpoint", "string", {
displayName: "LM Studio API Endpoint",
subtitle: "Base URL of LM Studio's OpenAI-compatible server.",
}, "http://localhost:1234")
.field("subAgentMaxIterations", "numeric", {
int: true, min: 1, max: 30,
displayName: "Sub-Agent Max Iterations",
subtitle: "Maximum tool-call loops per sub-agent run. " +
"Lower values are safer on low-RAM / slow devices (3–5 recommended).",
slider: { min: 1, max: 30, step: 1 },
}, 6)
.build();