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
<PackageReference Include="OutWit.Engine.Sdk" Version="1.0.1" />
<PackageVersion Include="OutWit.Engine.Sdk" Version="1.0.1" />
<PackageReference Include="OutWit.Engine.Sdk" />
paket add OutWit.Engine.Sdk --version 1.0.1
#r "nuget: OutWit.Engine.Sdk, 1.0.1"
#:package OutWit.Engine.Sdk@1.0.1
#addin nuget:?package=OutWit.Engine.Sdk&version=1.0.1
#tool nuget:?package=OutWit.Engine.Sdk&version=1.0.1
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:
- Replace
OutWit.Engine.SdkwithOutWit.Enginepackage - Replace
WitEngineSdk.InstancewithWitEngine.Instance - Configure distributed node infrastructure
- 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 | Versions 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. |
-
net10.0
- OutWit.Common.Logging (>= 1.2.2)
- OutWit.Common.Plugins (>= 1.1.0)
- OutWit.Engine.Parser (>= 1.0.1)
- OutWit.Engine.Shared (>= 1.0.1)
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 |