Code Blocks
Code blocks run typed TypeScript for logic that is awkward or unavailable in HAL itself. Herd deploys the code, extracts its input and output schemas, and creates a synchronized adapter for use in actions.Available tools
Code must use
@herd-labs/code-blocks-framework and export the framework server’s fetch handler. The declared input and output schemas become the adapter’s HAL types.
Lifecycle
- Create the code block with its name, TypeScript source, and optional intent.
- Execute the test deployment with representative inputs.
- Review logs when debugging, then disable log collection for faster calls.
- Publish the version before importing its adapter into an action.

