Core Concepts

Files GPAL Writes to Disk

GPAL.yaml is created and loaded automatically every run. A handful of optional config files -- credentialsConfig.json, LLMDigestRules.yaml, googleDorkingConfig.json -- follow the same Load/Save pattern but are only written when you call Save(). GPALRESTAPI also keeps a single emergency crash log.

GPAL.yaml - Created and Loaded Automatically

The first time your program runs in a given directory, GPAL.yaml does not exist, so GPAL creates it next to your executable with default settings and publishes a warning event telling you it did so. On every run after that, GPAL loads the file automatically and confirms it with an info event. GPAL.yaml holds the same settings you can configure in code -- things like typing delays, match thresholds, and driver behavior. If the file's version does not match the running GPAL version, GPAL updates it automatically. Edit GPAL.yaml by hand to change your defaults, or call GPAL.SaveSettings() to persist settings you changed at runtime.

GPAL.InformationHandler += (sender, e) => Console.WriteLine(e.Message);

// First run in this directory: GPAL.yaml does not exist yet, so GPAL

// creates it with default settings and publishes a WARNING.

// Every later run: GPAL.yaml exists, so GPAL loads it and publishes an INFO.

GPAL.WithMatchingPercentage(90)

.WithDownloadTimeoutInSec(30);

// Persist the settings above back to GPAL.yaml

GPAL.SaveSettings();

Optional Config Files - Written Only When You Save Them

Beyond GPAL.yaml, a small set of optional config files can be written to disk when you want to tune behavior without recompiling -- for credential OAuth endpoints, LLM page digest cleanup rules, and Google search API settings. All of them follow the same pattern: loading one returns built-in defaults in memory without writing anything to disk. Only an explicit Save() creates the file, so a fresh machine has none of them until you or your code decides to generate one.

// LLMDigestRules.yaml does not exist on disk until you save it

DigestRulesConfig digestRules = DigestRulesConfig.Default();

digestRules.Save();

// credentialsConfig.json works the same way - Load() returns

// defaults in memory, Save() writes them out for hand-editing

CredentialsConfig credentials = CredentialsConfig.Load();

credentials.GoogleRestRedirectUri = "http://localhost:3000/access-token";

credentials.Save();

TIP

Unlike GPAL.yaml, these three files are entirely optional. If they are missing, Load() quietly returns built-in defaults and your code keeps running. Only an explicit Save() writes the file, so a fresh checkout of your project has none of them until you. Or your code. Decides to create one.

GPALRESTAPI Crash Log

GPALRESTAPI. The REST API host used by OttoMagic. Keeps a single emergency log at C: empGPALRestApiCrash.log. It is only written when something goes wrong before or outside the normal GPAL event system: an exception during startup, or an unhandled exception that would otherwise crash the process with no record. Each entry appends a timestamp, the exception, and its stack trace to the file. Older entries are never removed automatically. When an unhandled exception is caught, GPALRESTAPI also shows a desktop toast notification pointing you at the file.

WARNING

Plain GPAL library code never writes C: empGPALRestApiCrash.log -- only the GPALRESTAPI host process does, as a last resort when something has gone wrong before, or outside of, the normal event system. For ordinary errors in your own GPAL code, subscribe to GPAL.ExceptionHandler as described in the event system concepts -- GPAL does not write files or logs on its own otherwise.