PulseTrade.Comm.Spa 0.1.0-preview6

This is a prerelease version of PulseTrade.Comm.Spa.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PulseTrade.Comm.Spa --version 0.1.0-preview6
                    
NuGet\Install-Package PulseTrade.Comm.Spa -Version 0.1.0-preview6
                    
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="PulseTrade.Comm.Spa" Version="0.1.0-preview6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PulseTrade.Comm.Spa" Version="0.1.0-preview6" />
                    
Directory.Packages.props
<PackageReference Include="PulseTrade.Comm.Spa" />
                    
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 PulseTrade.Comm.Spa --version 0.1.0-preview6
                    
#r "nuget: PulseTrade.Comm.Spa, 0.1.0-preview6"
                    
#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 PulseTrade.Comm.Spa@0.1.0-preview6
                    
#: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=PulseTrade.Comm.Spa&version=0.1.0-preview6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PulseTrade.Comm.Spa&version=0.1.0-preview6&prerelease
                    
Install as a Cake Tool

PulseTrade.Comm.Spa

POC extraction of the current PTC.Comm browser surfaces into a small Suave + WebSharper SPA package.

Kept routes:

  • /chat
  • /sets
  • /actors

OAuth:

  • GitHub browser OAuth is retained through /chat/login, /chat/oauth/callback, and /chat/logout.
  • Client secret is read only from ClientSecretPath; this POC does not read secrets from environment variables.

Run from source:

dotnet run --project .\PulseTrade.Comm.Spa.fsproj -c Release -- --port 8897

FSI shape after packing/publishing:

#r "nuget: PulseTrade.Comm.Spa, 0.1.0-preview6"

open PulseTrade.Comm.Spa

let app = Server.startDefault ()
printfn "%s/chat" app.Url

app.Hub.RegisterParticipant
  { ParticipantId = "agent.demo"
    DisplayName = Some "Demo Agent"
    Kind = Some "agent"
    Labels = Some [ "demo" ] }

app.Hub.AppendSet
  { Keys = [ "user.github.alice"; "agent.demo" ]
    SetName = "chat"
    Value = "hello"
    Tags = Some [ "fsi" ] }

// app.Dispose() stops Suave.

Shared site shape:

let options = { ServerOptions.defaults with Host = "0.0.0.0"; Port = 81 }

// Library A and library B can both call this in the same process.
// Matching normalized options reuse the same listener and CommHub.
let appFromA = Server.startShared options
let appFromB = Server.startShared options

obj.ReferenceEquals(appFromA.Hub, appFromB.Hub) // true

// Each handle is reference-counted. The underlying site stops after the last handle stops.
appFromA.Stop()
appFromB.Stop()

fCell2 key/value shape:

Source builds reference:

  • G:\coldfar_py\sharftrade9\Libs5\KServer\FCell2\FAkka.FCell2.fsproj
  • G:\coldfar_py\sharftrade9\Libs5\KServer\FCell2.WebSharper\FAkka.FCell2.WebSharper.fsproj

For NuGet #r, publish FAkka.FCell2 before packing PulseTrade.Comm.Spa. FAkka.FCell2.WebSharper is kept as a build/private browser companion so FSI resolves the canonical server-side fCell2 type.

Use canonical fCell2<string> in server/FSI code. Browser-side WebSharper code can use the same source vocabulary through FAkka.FCell2.WebSharper; that package defines JS, so D is compiled as float instead of decimal.

#r "nuget: PulseTrade.Comm.Spa, 0.1.0-preview6"

open PulseTrade.Comm.Spa
open PersistedConcurrentSortedList.Type
open FAkka.FCell2

let app = Server.startDefault ()

let cellArgs: AppendFCell2SetArgs<string> =
  { Keys = [ fCell2<string>.S "user.github.alice"; fCell2<string>.S "agent.aster" ]
    SetName = "chat"
    Value = fCell2<string>.S "hello from fCell2"
    Tags = Some [ "fcell2" ] }

app.Hub.AppendSet cellArgs |> ignore

let tableView: FCell2View<string, string, (string * string) list> =
  FCell2View.TableView(
    fCell2<string>.S "table-source",
    fun _ -> [ [ "colA", "A1"; "colB", "B1" ] ])

let tableArgs: AppendFCell2ViewSetArgs<string, string, (string * string) list> =
  { Keys = [ fCell2<string>.S "tab.grid" ]
    SetName = "grid"
    Value = tableView
    ListRowToText = id
    TableRowToCells = fun row -> row |> List.map (fun (k, v) -> k + "=" + v)
    Tags = Some [ "grid" ] }

app.Hub.AppendSet tableArgs |> ignore

Browser-side WebSharper shape:

open PersistedConcurrentSortedList.Type
open FAkka.FCell2

let tab = fCell2<string>.S "tab.chat"
let value =
  fCell2<string>.T(
    Map.ofList
      [ "body", fCell2<string>.S "hello from browser"
        "score", fCell2<string>.D 12.34 ])

let keyText = FCell2Text.key tab
let valueText = value.toJsonString()
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 (1)

Showing the top 1 NuGet packages that depend on PulseTrade.Comm.Spa:

Package Downloads
PulseTrade.Comm.GW.PTCS

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.4-beta8 0 6/21/2026
0.2.4-beta7 38 6/21/2026
0.2.4-beta6 34 6/21/2026
0.2.3-beta5 40 6/20/2026
0.1.0-preview6 46 6/20/2026
0.1.0-preview4 49 6/5/2026
0.1.0-preview3 47 6/5/2026
0.1.0-preview2 45 6/5/2026
0.1.0-preview1 53 6/4/2026