ToolUp.AI.Wire 0.43.0

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

ToolUp.AI.Wire

The portable JSON substrate for building and reading wire payloads, compilable to both .NET and Fable (browser). It depends on FSharp.Core + Fable.Core only — no System.Net.Http, no System.Text.Json — so one mapping can serve a server host and a browser host without re-deriving the translation.

What it gives you

  • JsonValue (namespace ToolUp.Remoting.Json) — the one closed JSON value model: JsonValue.Null / Bool / Number / String / Array / Object. A number carries its token as written (Number of lexical: string), so an int64 past 2^53 or a decimal written to thirty places survives a round trip. Object members are an ordered array, so serialization preserves insertion order and is byte-stable.
  • Builders — jnull / jbool / jint / jint64 / jdecimal / jnum / jstr / jarr / jobj, auto-opened with the namespace.
  • Total accessors — tryMember / tryItem / asString / asBool / asInt / asInt64 / asDecimal / asFloat / asNumberText / asArray / asObject. Every one returns option and never throws; the numeric ones parse the token on demand.
  • The text seam — JsonHost.serialize (the one canonical writer, identical on every host), JsonHost.escape (its string escape, for JSON written by hand) and JsonHost.parse (the portable JsonText parser on both hosts), returning JsonValue option. JsonText.tryParse returns the refusal (ToolUp.Remoting.DecodeError) instead.
  • JsonEncode — the typed encoders a generated remoting proxy writes its arguments through, over the same model and writer.
  • The connector contract (Contract.fs, namespace ToolUp.Platform.AI) — the portable IAIProvider value types a browser host can reference directly: AIProviderMessage / AIProviderToolCall / AIProviderToolResult / AIProviderToolDef / AIProviderResponse / TokenUsage / AIProviderCapabilities / AIProviderError / AIContentPart (+ ImageSource / ImagePayload) and their companion modules. They keep the ToolUp.Platform.AI namespace so a ToolUp.Platform consumer sees them unchanged; the IAIProvider interface itself stays in ToolUp.Platform.Core (it references the server-tier RetryPolicy).

Example

open ToolUp.AI.Wire
open ToolUp.Remoting.Json

let body =
    jobj
        [ "model", jstr "example-model"
          "stream", jbool true
          "messages", jarr [ jobj [ "role", jstr "user"; "content", jstr "hi" ] ] ]

let json = JsonHost.serialize body
// {"model":"example-model","stream":true,"messages":[{"role":"user","content":"hi"}]}

let model =
    JsonHost.parse json
    |> Option.bind (JsonValue.tryMember "model")
    |> Option.bind JsonValue.asString
// Some "example-model"

Byte-stable output

JsonHost.serialize is a hand-rolled canonical writer rather than a passthrough to two different host JSON engines, so its bytes are identical on .NET and Fable for the same JsonValue. Object members emit in model order, a number emits as its token, and output is compact (no insignificant whitespace).

Licensed under Apache-2.0.

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 (4)

Showing the top 4 NuGet packages that depend on ToolUp.AI.Wire:

Package Downloads
ToolUp.Platform.Core

ToolUp.Platform Core — shared types and interfaces (ILogger, IBlobStorage, IAuthProvider, IAIProvider, INotificationChannel, IHealthCheck, IConfigValidator, etc.). No server or client deps; the "minimum viable module" floor for downstream packages.

ToolUp.AI.Server

ToolUp.AI Server — agent loop, SSE streaming, tool registry, system-prompt composition (platform + team + module layers), AICompose. Depends on ToolUp.Platform.Server + ToolUp.AI.Core.

ToolUp.AIProviders.Claude

Claude (Anthropic) IAIProvider implementation for ToolUp.AI. BYOK-capable; reads API keys from ISecretStore.

ToolUp.Facts.Presentation

ToolUp.Facts.Presentation — from a gated fact series to a Fuaran-UI node. A presentation request (trend, breakdown, comparison or table; the whole of what a model may author for a block) and its JSON codec, and pure builders that draw a FactSeries as a validated Fuaran-UI node with the BlockProvenance that produced it. A withheld or absent point is never drawn as a number: it is left out of the rows and named with its reason. And the pipeline block: the request an evaluate_pipeline block part persists, the re-run's wire result and remoting contract, and the grid a result is drawn as. And the requests a stored page names — a presentation request or a pipeline request — in their canonical JSON, with the data a resolution of one carries. Compiled by both compilers, so a browser rebuilds exactly what a server built.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.43.0 0 11/25/2026
0.42.1 1,952 11/16/2026
0.41.0 1,847 11/7/2026
0.40.0 1,734 11/6/2026
0.39.0 1,746 11/4/2026
0.38.1 1,713 11/1/2026
0.38.0 1,584 10/31/2026
0.37.0 1,508 10/29/2026
0.36.0 1,513 10/29/2026
0.35.0 1,476 10/28/2026
0.34.1 1,482 10/27/2026
0.34.0 1,472 10/26/2026
0.33.0 1,476 10/25/2026
0.32.0 1,465 10/24/2026
0.31.0 1,460 10/22/2026
0.30.0 1,417 10/20/2026
0.29.0 1,304 10/19/2026
0.28.0 1,344 10/19/2026
0.27.0 1,364 10/16/2026
0.26.0 1,400 10/12/2026
Loading failed