Skip to main content

Module stdlib

Module stdlib 

Source
Expand description

Standard library builtins for the Harn VM.

Modules§

agent_state
asset_paths
Re-export of harn_modules::asset_paths plus a VM-side convenience that anchors the project-root walk at the currently-executing source file (via VM_SOURCE_DIR) and falls back to the existing source-relative resolver when the path is not an @-prefixed asset reference.
host
process
secret_scan
template
Prompt-template engine for .harn.prompt assets and the render / render_prompt builtins.
tracing
workflow_messages

Functions§

register_agent_stdlib
Register agent builtins (requires network access and async runtime).
register_core_stdlib
Register core builtins: pure/deterministic, no I/O.
register_io_stdlib
Register I/O builtins (requires OS access).
register_vm_stdlib
Register all standard builtins on a VM (core + io + agent).
reset_stdlib_state
Reset thread-local stdlib state. Call between test runs.
stdlib_builtin_names
Return the canonical list of all stdlib builtin names. Used by harn-lint and harn-lsp to avoid hardcoded duplicate lists.