PulseTrade.Comm.Spa
0.1.0-preview6
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
<PackageReference Include="PulseTrade.Comm.Spa" Version="0.1.0-preview6" />
<PackageVersion Include="PulseTrade.Comm.Spa" Version="0.1.0-preview6" />
<PackageReference Include="PulseTrade.Comm.Spa" />
paket add PulseTrade.Comm.Spa --version 0.1.0-preview6
#r "nuget: PulseTrade.Comm.Spa, 0.1.0-preview6"
#:package PulseTrade.Comm.Spa@0.1.0-preview6
#addin nuget:?package=PulseTrade.Comm.Spa&version=0.1.0-preview6&prerelease
#tool nuget:?package=PulseTrade.Comm.Spa&version=0.1.0-preview6&prerelease
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.fsprojG:\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 | 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
- FAkka.FCell2 (>= 10.1.201)
- FSharp.Core (>= 10.1.300)
- Suave (>= 3.4.3)
- WebSharper (>= 10.1.5.674)
- WebSharper.FSharp (>= 10.1.5.674)
- WebSharper.UI (>= 10.1.4.674)
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 |