AkkaFsiMcpServer 1.4.12

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

AkkaFsiMcpServer

G:\PulseTrade.fs\AkkaFsiMcpServer 是本工作區唯一 canonical FSI MCP Server。Libs/[DEPRECATED]FSharp.MCP.DevKit 僅供唯讀程式碼參考,禁止用於 build、deployment、runtime、package reference 或新功能開發。

Runtime ownership

  • AkkaFsiMcpServer 擁有它建立的所有 FSI ProcNode。<OutputRoot>/_pool/ownership.json manifest v2 記錄 logical session、ProcId/PID、init marker、created/expires、last activity、kind 與 revision。
  • 啟動新 MCP generation 時先 reconciliation:有效且未到期的 leased session hydrate 回原 ProcNode/PID,保留原 absolute expiry 與 FSI state;invalid、expired 或舊 v1 無 session mapping 的 entry 才 exact stop/remove。未完成 reconciliation 前不得建立新 worker。
  • ordinary graceful shutdown只 seal admission、收斂 start intent並 flush manifest,保留有效 leased worker。只有 explicit retire-all、session delete/hard cancel或TTL到期才停止對應 exact ProcId。
  • ProcSupervisor 提供 launch、control 與 cooperative rebind transport。它不因自身 restart 就終止 child,也不以 OS parent/PID 猜測 AkkaFsiMcpServer 的 domain ownership。
  • managed ProcNode 以 ProcNodeReady 明載 child-owned Akka control spec;replacement Supervisor 只有在 challenge 與 OS identity 同時驗證成功後才恢復同 PID 的最小控制,且不建立 restart authority。
  • Server 實作既有 loopback-only supervisee HTTP contract:status、shutdown、shutdown receipt query/ACK。禁止重新導入 Native Agent 或 exact OS handle rebind。

Build and test

dotnet build .\AkkaFsiMcpServer\AkkaFsiMcpServer.fsproj -c Release
dotnet test .\AkkaFsiMcpServer.Tests\AkkaFsiMcpServer.Tests.fsproj -c Release
dotnet run --project .\AkkaFsiMcpServer.Tests.Expecto\AkkaFsiMcpServer.Tests.Expecto.fsproj -c Release -- --summary

正式 package 只使用 project-owned Pack -> PostBuildEvent.ps1 流程:

dotnet pack .\AkkaFsiMcpServer\AkkaFsiMcpServer.fsproj -c Release

PostBuildEvent 只讀既有 NuGet API key file,禁止把 key 寫入專案、log 或命令列。依賴 FAkka.FSI.Supervisor 與 FAkka.Proc.Supervisor 必須 exact pin,且須先確認 public NuGet 可解析後才能發布本 package。

eval_fsharp 與 enqueue_fsharp_job 使用 server 預設 execution/output budget。需要 NuGet restore、較長編譯或其他已知長任務時,agent 必須改用 eval_fsharp_with_options 或 enqueue_fsharp_job_with_options,由 caller 明確指定 timeout_ms 與 max_output_chars;不可把 30 秒預設當成所有 F# 工作的固定上限。captureStdout=true 的 hosted FCS execution 在尚未完成時也會逐行發布 stdout/stderr,get_recent_output 不需等待 terminal ExecResult。

Service deployment 使用 canonical installer;先 Plan/Prepare,再 Apply:

pwsh -NoProfile -File .\AkkaFsiMcpServer\scripts\Install-AkkaFsiMcpServerService.ps1 -Environment test -PlanOnly
pwsh -NoProfile -File .\AkkaFsiMcpServer\scripts\Install-AkkaFsiMcpServerService.ps1 -Environment test -PrepareOnly
pwsh -NoProfile -File .\AkkaFsiMcpServer\scripts\Install-AkkaFsiMcpServerService.ps1 -Environment test -Confirm:$false

正式環境將 -Environment 改為 prod。-RetireLegacyOwnedWorkers 的prefix retirement已移除並會fail-fast;舊版遷移須先確認list_sessions沒有live binding,再只停止明確盤點的exact ProcId。installer不啟停ProcSupervisor、PTC Hosts或MDCQ,且會清除MCP對ProcSupervisor的Windows Service dependency,讓Proc replacement不連帶停止MCP;rollback會恢復原dependency。

Live acceptance

部署後至少驗證:

  1. /health;建立或恢復 session 並完成 eval 後驗 /health/fsi。尚未配置 worker 的 default session可回 503 / stopped / unassigned,不能單獨判為transport故障。
  2. MCP tools/list 與 detachable session create/eval/reset。
  3. hosted FCS session 可 absolute #load 專用腳本;內層 reference/load、NuGet resolution、必要 stdout 與實際 runtime 結果必須驗證。direct FSI 與 hosted FCS 的 fsi.CommandLineArgs 入口形狀不同,不得以 argv 相同作驗收。
  4. restart 後 ownership reconciliation 不遺留上一 generation ProcNode。
  5. supervisee status 可由 ProcSupervisor challenge;graceful shutdown 在 receipt ACK 前不停止 Server。
  6. 只重啟 ProcSupervisor 後,MCP 與 worker PID 必須不變;原 detachable session 必須可繼續 eval,node 不得停在 non-rebindable。
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

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
1.4.12 105 10/17/2026
1.4.11 98 10/17/2026
1.4.10 83 10/17/2026
1.4.9 92 10/17/2026
1.4.8 89 10/17/2026
1.4.7 88 10/17/2026
1.4.6 88 10/17/2026
1.4.5 90 10/17/2026
1.4.4 89 10/16/2026
1.4.3 91 10/16/2026
1.4.2 89 10/16/2026