runner
runner is an execution engine designed to process nanoservice-based workflows efficiently. It provides a structured way to execute bloks within a defined workflow, enabling modular, reusable backend logic.
Relationship to the rest of the project
Note: For a complete reference visit runner Runner is responsibly for reading workflow files and executing provided nodes based on the selected trigger. Think about it as a conductor that orchestrates the execution of nanoservices.
In addition, it also tracks important parameters and metrics during the workflow execution that can be used for debugging and monitoring purposes.
**Guide to Contributing to the Runner in Blok **
Note: Make sure you follow the recommendations on how to set up local environment and steps to complete before committing your changes. To learn more visit
1. Clone the Repository
git clone https://github.com/deskree-inc/nanoservice-ts.git
cd nanoservice-ts/core/runner
npm install2. Run the Runner Locally
npm run devThis will start the Runner in development mode, allowing you to test changes in real-time.
Understanding the Runner
The Runner is responsible for:
✅ Executing nanoservices in an isolated environment.
✅ Managing resource allocation (CPU, memory).
✅ Handling retries, error logging, and state management.
Adding Features or Fixing Bugs
1. Create a Feature Branch
git checkout -b feature/improve-runner-logging2. Make Your Changes
Modify the relevant files inside /core/runner/src/.
Example: Improving logging in executor.ts
import { logInfo } from './logger';
async function executeNode(node: NodeConfig) {
logInfo(`Executing node: ${node.id} (${node.type})`);
// Execution logic...
}3. Test Your Changes
Run unit tests:
npm testManually test with:
npm run dev4. Submit a Pull Request
Push your changes and open a PR on GitHub.
git push origin feature/improve-runner-loggingIn the PR description, include:
- What was changed?
- Why was it changed?
- How was it tested?
Best Practices
✅ Keep functions modular and reusable.
✅ Write unit tests for new features.
✅ Use consistent logging for observability.
✅ Ensure changes do not break existing workflows.
Final Notes
Contributing to the Runner helps improve the efficiency and reliability of nanoservice-ts. If you have any questions, open an issue on GitHub! 🚀