A task execution system with automatic suspend/resume capabilities, built for modern Node.js environments.
npx sequential-ecosystem init
npx sequential-ecosystem start# Clone and setup
git clone <repository>
cd sequential-ecosystem
npm install
# Start the system
npm run start- Automatic Suspend/Resume: Tasks automatically pause on HTTP calls and resume when complete
- HTTP-based Architecture: All tools and tasks communicate via HTTP endpoints
- Task Management: Create, manage, and execute tasks dynamically
- Tool Integration: External services are integrated as HTTP-callable tools
- State Management: Automatic state saving and loading for long-running tasks
# Start with default port 3000
npx sequential-ecosystem start
# Start with custom port
npx sequential-ecosystem start --port 8080
# Enable debug logging
npx sequential-ecosystem start --debug# Create a new task
npx sequential-ecosystem create-task my-task
# Create with description
npx sequential-ecosystem create-task my-task --description "My custom task"# Set up Gmail search task
npx sequential-ecosystem setup-gapi
# Add your service account key to /mnt/c/dev/smtp/service-account-key.jsonOnce the system is running, these endpoints are available:
GET /- API informationGET /status- System status
POST /tasks/{task-name}- Execute a specific task
Example:
curl -X POST http://localhost:3000/tasks/comprehensive-gmail-search \
-H "Content-Type: application/json" \
-d '{
"gmailSearchQuery": "from:important",
"maxResultsPerUser": 5,
"maxUsersPerDomain": 10
}'POST /tools/{tool-name}- Call external tools
sequential-ecosystem/
├── cli.ts # Main CLI entry point
├── system/ # System modules
│ ├── start.js # System startup logic
│ ├── create-task.js # Task creation utilities
│ └── setup-gapi.js # GAPI setup utilities
├── packages/
│ ├── sequential-adaptor/ # Core task execution engine
│ ├── sequential-runner/ # Sequential task runner
│ │ └── taskcode/
│ │ └── endpoints/ # Task definitions
│ └── sequential-wrapped-services/ # External service integrations
└── dist/ # Built distribution files
- Task Loading: Tasks are automatically loaded from
packages/sequential-runner/taskcode/endpoints/ - HTTP Communication: All external calls go through HTTP endpoints
- Automatic Pause/Resume: When a task makes an HTTP call, it automatically:
- Pauses execution
- Saves current state
- Makes the HTTP request
- Resumes execution with results
- State Management: Task state is preserved across HTTP calls
Tasks are simple JavaScript modules that export a function:
module.exports = async function({ parameter1, parameter2 }) {
console.log('🚀 Starting task');
try {
// Make HTTP call - automatically pauses/resumes
const response = await fetch('http://localhost:3000/tools/some-tool', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ data: 'value' })
});
const result = await response.json();
return {
success: true,
data: result
};
} catch (error) {
return {
success: false,
error: error.message
};
}
};The system includes a comprehensive Gmail search task:
- Setup: Run
npx sequential-ecosystem setup-gapi - Configure: Add your Google Workspace service account key to
/mnt/c/dev/smtp/service-account-key.json - Execute: Call the task via HTTP POST to
/tasks/comprehensive-gmail-search
Enable debug mode:
npx sequential-ecosystem start --debugCheck system status:
curl http://localhost:3000/statusMIT License - see LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For issues and questions:
- Check the existing tasks in
packages/sequential-runner/taskcode/endpoints/ - Review the system logs when running with
--debug - Ensure all HTTP calls use the correct endpoint format