Host functions
FScript provides the language and standard library documented in the FScript manual. Terrabuild 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
Return ShellOperation values to request commands. Host functions run while Terrabuild evaluates the extension. Shell operations run later under the graph's scheduling, container, caching, and failure rules.
For the language's built-in modules and functions, use the FScript standard-library reference.