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
<PackageReference Include="ToolUp.AI.Wire" Version="0.43.0" />
<PackageVersion Include="ToolUp.AI.Wire" Version="0.43.0" />
<PackageReference Include="ToolUp.AI.Wire" />
paket add ToolUp.AI.Wire --version 0.43.0
#r "nuget: ToolUp.AI.Wire, 0.43.0"
#:package ToolUp.AI.Wire@0.43.0
#addin nuget:?package=ToolUp.AI.Wire&version=0.43.0
#tool nuget:?package=ToolUp.AI.Wire&version=0.43.0
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(namespaceToolUp.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 anint64past 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 returnsoptionand 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) andJsonHost.parse(the portableJsonTextparser on both hosts), returningJsonValue option.JsonText.tryParsereturns 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, namespaceToolUp.Platform.AI) — the portableIAIProvidervalue types a browser host can reference directly:AIProviderMessage/AIProviderToolCall/AIProviderToolResult/AIProviderToolDef/AIProviderResponse/TokenUsage/AIProviderCapabilities/AIProviderError/AIContentPart(+ImageSource/ImagePayload) and their companion modules. They keep theToolUp.Platform.AInamespace so aToolUp.Platformconsumer sees them unchanged; theIAIProviderinterface itself stays inToolUp.Platform.Core(it references the server-tierRetryPolicy).
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 | 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
- Fable.Core (>= 5.0.0)
- FSharp.Core (>= 10.1.300)
- ToolUp.Platform.Transport (>= 0.43.0)
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 |