OutWit.Engine.Sdk 1.0.1

dotnet add package OutWit.Engine.Sdk --version 1.0.1
                    
NuGet\Install-Package OutWit.Engine.Sdk -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OutWit.Engine.Sdk" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Engine.Sdk" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Engine.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OutWit.Engine.Sdk --version 1.0.1
                    
#r "nuget: OutWit.Engine.Sdk, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OutWit.Engine.Sdk@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OutWit.Engine.Sdk&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Engine.Sdk&version=1.0.1
                    
Install as a Cake Tool

OutWit.Engine.Sdk

Limited SDK version of WitEngine for plugin development and testing.

Overview

This package provides a standalone, limited version of the WitEngine for developing and testing controller plugins without access to the full commercial engine or distributed infrastructure.

Installation

dotnet add package OutWit.Engine.Sdk

Features

  • Full script parsing and compilation
  • Local job execution
  • Plugin loading and testing
  • Activity and variable adapter development
  • Benchmarking support

SDK Limitations

The SDK version has built-in limits to differentiate it from the production engine:

Limit Value Description
MAX_ACTIVITIES_PER_JOB 50 Maximum activities in one job
MAX_VARIABLES_PER_JOB 100 Maximum variables in one job
MAX_EXECUTION_TIME_SECONDS 300 Maximum job execution time (5 min)
MAX_NODES 1 Local execution only
MAX_VARIABLE_SIZE_BYTES 100 MB Maximum data size per variable
MAX_NESTING_DEPTH 10 Maximum composite nesting
MAX_PARALLEL_ACTIVITIES 4 Maximum parallel activities

These limits are sufficient for plugin development and testing but not for production workloads.

Usage

Basic Setup

// Initialize the SDK engine
WitEngineSdk.Instance.Reload();

// Compile a job script
var job = WitEngineSdk.Instance.Compile(@"
    Job:Example()
    {
        Int:x = 42;
        Trace(""Value: "" + x, false);
    }
");

// Execute and wait for result
var status = await WitEngineSdk.Instance.ScheduleAndWaitAsync(job);

if (status.Result == WitProcessingResult.Completed)
{
    Console.WriteLine("Job completed successfully");
}

With Custom Controller Path

WitEngineSdk.Instance.Reload(
    useIsolatedContext: true,
    logger: myLogger,
    moduleFolder: @"C:\MyControllers"
);

Testing a Controller

[TestFixture]
public class MyControllerTests
{
    [OneTimeSetUp]
    public void Setup()
    {
        WitEngineSdk.Instance.Reload();
    }

    [Test]
    public async Task MyActivityWorksTest()
    {
        var job = WitEngineSdk.Instance.Compile(@"
            Job:Test()
            {
                Int:result = MyActivity(10, 20);
            }
        ");

        var status = await WitEngineSdk.Instance.ScheduleAndWaitAsync(job);
        
        Assert.That(status.Result, Is.EqualTo(WitProcessingResult.Completed));
    }
}

Using WitEngineNodeSdk

For testing node-side functionality:

WitEngineNodeSdk.Instance.Reload();

// Run benchmark
var result = await WitEngineNodeSdk.Instance.RunBenchmark<MyActivity>(
    options, 
    cancellationToken
);

// Check compatibility
bool compatible = WitEngineNodeSdk.Instance.IsCompatibleWith<MyActivity>(capabilities);

SDK-Specific Logging

All SDK log messages are prefixed with [SDK] for easy identification:

[SDK] WitEngine SDK initialized
[SDK] Limits: MaxActivities=50, MaxVariables=100, MaxExecutionTime=300s
[SDK] Starting job execution: MyJob
[SDK] Job completed in 00:00:01.234

Exception Handling

When SDK limits are exceeded, SdkLimitExceededException is thrown:

try
{
    var job = WitEngineSdk.Instance.Compile(largeJobScript);
}
catch (SdkLimitExceededException ex)
{
    Console.WriteLine($"Limit exceeded: {ex.LimitName}");
    Console.WriteLine($"Current: {ex.CurrentValue}, Max: {ex.MaxValue}");
}

Project Structure

OutWit.Engine.Sdk/
  WitEngineSdk.cs              - Main SDK engine class
  WitEngineNodeSdk.cs          - SDK node for local testing
  Limits/
    SdkLimits.cs               - Limit constants
    SdkLimitExceededException.cs - Limit exceeded exception
    SdkLimitValidator.cs       - Validation logic
  Managers/
    SdkProcessingManager.cs    - Processing with limit checks
    SdkNodesManager.cs         - Local-only nodes manager
    SdkResourcesManager.cs     - Resources manager
  Factories/
    WitJobFactory.cs           - Job factory

Migrating to Full WitEngine

When ready for production:

  1. Replace OutWit.Engine.Sdk with OutWit.Engine package
  2. Replace WitEngineSdk.Instance with WitEngine.Instance
  3. Configure distributed node infrastructure
  4. Remove SDK limit workarounds if any

The API is identical, only the implementation differs.

Dependencies

  • OutWit.Engine.Parser
  • OutWit.Engine.Shared
  • OutWit.Common.Logging
  • OutWit.Common.Plugins

License

This software is licensed under the Non-Commercial License (NCL).

  • Free for personal, educational, and research purposes
  • Commercial use requires a separate license agreement
  • Contact licensing@ratner.io for commercial licensing inquiries

See the full LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 77 1/16/2026