Host Functions
FScript provides the language and standard library documented in the FScript manual. Terrabuild additionally controls which host functions an extension may call.
Terrabuild exposes the default FScript host registry except for concurrency and interactive-input functions that do not fit deterministic build-graph evaluation:
Task.spawnTask.awaitConsole.readLine
Functions Available to Extensions
Filesystem
Fs.readTextFs.existsFs.kindFs.createDirectoryFs.writeTextFs.combinePathFs.parentDirectoryFs.extensionFs.fileNameWithoutExtensionFs.globFs.enumerateFiles
Filesystem access is confined to the workspace root. Paths matching workspace.deny are unavailable; the default deny list is [ ".git" ].
Data and utilities
Regex.matchGroupsHash.md5Guid.newJson.deserializeJson.serializeXml.queryValues
Output
Console.writeLine
Use returned ShellOperation values to request build commands. Host functions run while Terrabuild evaluates the extension; shell operations run later under normal graph scheduling, container, caching, and failure rules.
For the language's built-in modules and functions, use the FScript standard-library reference.