Universal.Operative.Sdk.Compression 2.0.0

dotnet add package Universal.Operative.Sdk.Compression --version 2.0.0
                    
NuGet\Install-Package Universal.Operative.Sdk.Compression -Version 2.0.0
                    
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="Universal.Operative.Sdk.Compression" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.Operative.Sdk.Compression" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Universal.Operative.Sdk.Compression" />
                    
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 Universal.Operative.Sdk.Compression --version 2.0.0
                    
#r "nuget: Universal.Operative.Sdk.Compression, 2.0.0"
                    
#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 Universal.Operative.Sdk.Compression@2.0.0
                    
#: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=Universal.Operative.Sdk.Compression&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Universal.Operative.Sdk.Compression&version=2.0.0
                    
Install as a Cake Tool

About

Universal.Operative.Sdk.Compression adds two IShellHook implementations for Universal.Operative.Sdk's BashTool/PowerShellTool, so large shell output doesn't reach the model as-is:

  • CommandCompressionHook — an AfterExecute hook backed by Universal.GenerativeAI.CommandCompression: parses captured stdout/stderr for recognized command families (git, docker, kubectl, test runners, package managers, and more) and compresses them, run in-process, no external dependency.
  • RtkProxyHook — a BeforeExecute hook that proxies a call through the external rtk CLI when it's on PATH: rtk spawns the target command itself and compresses its output before this SDK ever captures anything. Only applies to a command that parses as one simple invocation with no shell operators, redirects, backgrounding, or command substitution — anything else is left to run through the shell unchanged, since rtk's contract is a plain argv, not a shell string.

Both are opt-in and safe by default: each declines (returns null / leaves the command alone) rather than forcing output through a shape it doesn't recognize. RtkProxyHook additionally verifies, at construction time, that whatever answers to the configured executable name is actually rtk-ai/rtk — there's a documented, unrelated project also named "rtk" ("Rust Type Kit") — by checking that its --help output mentions token compression. No binary on PATH at all is the ordinary case and stays quiet; a name match that fails that check throws InvalidOperationException instead of silently doing nothing, since a wrong tool sitting where rtk was expected is a misconfiguration worth surfacing loudly.

How to Use

Installation

dotnet add package Universal.Operative.Sdk.Compression

Usage

using Universal.Operative.Sdk.Compression;
using Universal.Operative.Sdk.Tools.Shell;

var shellTools = new ShellToolBuilder()
    .WithRtkProxy()             // no-ops if `rtk` isn't installed
    .WithCommandCompression();  // in-process fallback/complement

IEngine engine = EngineBuilder.FromDefaults(model)
    .AddBaselineToolSet(shellTools: shellTools)
    .Build();

Both hooks can be constructed and added directly too (shellTools.AddBeforeExecuteHook(new RtkProxyHook())), or passed a custom CommandCompressor/tokenizer for finer control.

License

Free for noncommercial use under the Universal.Operative Noncommercial License. Source is closed; commercial use requires a separate license from Andrew Ong.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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
2.0.0 94 9/1/2026
1.3.0 103 8/26/2026
1.2.1 100 8/21/2026
1.2.0 103 8/12/2026
1.1.1 104 8/5/2026
1.1.0 107 7/28/2026
1.0.1 113 7/27/2026
1.0.0 110 7/26/2026

Coordinated major release for Universal.Operative.Sdk 6 and the canonical provider-neutral tool-dispatch boundary.