src / config.ts

import { createConfigSchematics } from "@lmstudio/sdk";

export const configSchematics = createConfigSchematics()
  .field(
    "defaultTimeout",
    "numeric",
    {
      displayName: "Default Timeout (ms)",
      description: "The maximum time a command is allowed to run before timing out.",
    },
    10000
  )
  .field(
    "allowAutoExecution", 
    "boolean",
    {
      displayName: "Allow Automatic Execution",
      description: "DANGER: Check this box to allow the model to run commands. If unchecked, all commands are blocked.",
    },
    false
  )
  .field(
    "allowedDirectories",
    "string",
    {
      displayName: "Allowed Directories",
      description: "Comma-separated list of absolute paths where commands are allowed to run. Leave empty to allow all.",
    },
    ""
  )
  .build();