From 7a5bf0709f94375058d4e4e3a4086c878191935e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=88=E7=BA=BE?= Date: Thu, 22 Oct 2026 17:19:47 +0800 Subject: [PATCH 1/5] =?UTF-8?q?docs:=20=E5=A2=9E=E5=8A=A0=20AGENTS.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..83b608c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,40 @@ +# AGENTS.md + +F# source loader for the Hosihikari Framework. It compiles `.fsx` files with FSharp.Compiler.Service +at load and runs the result in a collectible assembly load context. + +## Repository map + +- `src/` — loader implementation and cache. +- `host/` — assertion host for compilation, caching, isolation, and unload. +- `test/` — fixture packages and private dependencies. +- `pack.ps1`, `pack.sh` — build the `hosihikari-fsharp` lip package. +- `tooth.json` — lip package metadata. + +## Build and verify + +```bash +dotnet run --project host/Hosihikari.PluginLoader.FSharp.Host.csproj -c Release --nologo +pwsh ./pack.ps1 -Version 1.0.0 -OutputRoot artifacts +``` + +The host expects sibling `PluginManager`, `Plugin.Abstractions`, and +`Hosihikari.McMaster.NETCore.Plugins` checkouts. `pack.ps1` calls the core packer and needs the same +`PluginManager` checkout. + +## Invariants + +- The package is a plugin package named `hosihikari-fsharp`; its manifest routes on + `extraInfo.loader: fsharp` and entry `main.fsx`. +- Compile-time references follow the runtime order: framework shared layer, package-local DLLs, + then trusted platform assemblies. +- Cache keys cover source text, `#load` and local `#r` inputs, package-local DLLs, compiler version, + and runtime version. Keep the checksum check in sync. +- A failed load releases its ALC; one package exposes exactly one `IPlugin` type. +- Public default branches are protected. Work on a branch, open a pull request, and squash merge. + +## Context + +- [Design record](https://github.com/HosihikariFramework/Design) — GLOSSARY and ADRs. +- [F# loader](https://github.com/HosihikariFramework/FSharpLoader) and the + [F# plugin template](https://github.com/HosihikariFramework/FSharpPluginTemplate). From 5173cb60708332b7e00108413413f6cb1d1dd6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=88=E7=BA=BE?= Date: Thu, 22 Oct 2026 17:23:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?docs:=20=E4=BF=AE=E6=AD=A3=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=99=A8=E5=8C=85=E6=B8=85=E5=8D=95=E4=B8=8E=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 83b608c..758e51c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,10 +24,11 @@ The host expects sibling `PluginManager`, `Plugin.Abstractions`, and ## Invariants -- The package is a plugin package named `hosihikari-fsharp`; its manifest routes on +- The loader package is named `hosihikari-fsharp`; it routes on `extraInfo.loader: assembly` with + entry `Hosihikari.PluginLoader.FSharp.dll`. Source packages it handles use `extraInfo.loader: fsharp` and entry `main.fsx`. - Compile-time references follow the runtime order: framework shared layer, package-local DLLs, - then trusted platform assemblies. + the loader directory (for dependencies such as `FSharp.Core`), then trusted platform assemblies. - Cache keys cover source text, `#load` and local `#r` inputs, package-local DLLs, compiler version, and runtime version. Keep the checksum check in sync. - A failed load releases its ALC; one package exposes exactly one `IPlugin` type. From 71755a9a42510754f808110e76c6b8fa53a42054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=88=E7=BA=BE?= Date: Thu, 22 Oct 2026 17:29:41 +0800 Subject: [PATCH 3/5] =?UTF-8?q?docs:=20=E5=8E=BB=E6=8E=89=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=20pack.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 758e51c..5f5c17c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ at load and runs the result in a collectible assembly load context. - `src/` — loader implementation and cache. - `host/` — assertion host for compilation, caching, isolation, and unload. - `test/` — fixture packages and private dependencies. -- `pack.ps1`, `pack.sh` — build the `hosihikari-fsharp` lip package. +- `pack.ps1` — build the `hosihikari-fsharp` lip package. - `tooth.json` — lip package metadata. ## Build and verify From c8eea78d47bb456c071de5d04f8aaea4d1bf7282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=88=E7=BA=BE?= Date: Thu, 22 Oct 2026 17:55:08 +0800 Subject: [PATCH 4/5] =?UTF-8?q?docs:=20=E4=BF=AE=E6=AD=A3=20McMaster=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8E=E5=85=A5=E5=8F=A3=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5f5c17c..9d579b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,9 +18,8 @@ dotnet run --project host/Hosihikari.PluginLoader.FSharp.Host.csproj -c Release pwsh ./pack.ps1 -Version 1.0.0 -OutputRoot artifacts ``` -The host expects sibling `PluginManager`, `Plugin.Abstractions`, and -`Hosihikari.McMaster.NETCore.Plugins` checkouts. `pack.ps1` calls the core packer and needs the same -`PluginManager` checkout. +The host expects sibling `PluginManager`, `Plugin.Abstractions`, and `McMaster.NETCore.Plugins` +checkouts. `pack.ps1` calls the core packer and needs the same `PluginManager` checkout. ## Invariants @@ -31,7 +30,8 @@ The host expects sibling `PluginManager`, `Plugin.Abstractions`, and the loader directory (for dependencies such as `FSharp.Core`), then trusted platform assemblies. - Cache keys cover source text, `#load` and local `#r` inputs, package-local DLLs, compiler version, and runtime version. Keep the checksum check in sync. -- A failed load releases its ALC; one package exposes exactly one `IPlugin` type. +- A failed load releases its ALC. After excluding abstract/interface types and implementations + without a public parameterless constructor, a package exposes exactly one `IPlugin` candidate. - Public default branches are protected. Work on a branch, open a pull request, and squash merge. ## Context From c0232eb23b7096f795fd025a9a4189851d832acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=88=E7=BA=BE?= Date: Thu, 22 Oct 2026 17:59:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?docs:=20=E5=85=A5=E5=8F=A3=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=8C=89=E6=B8=85=E5=8D=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9d579b2..17114e9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,8 +24,9 @@ checkouts. `pack.ps1` calls the core packer and needs the same `PluginManager` c ## Invariants - The loader package is named `hosihikari-fsharp`; it routes on `extraInfo.loader: assembly` with - entry `Hosihikari.PluginLoader.FSharp.dll`. Source packages it handles use - `extraInfo.loader: fsharp` and entry `main.fsx`. + entry `Hosihikari.PluginLoader.FSharp.dll`. Source packages conventionally use + `extraInfo.loader: fsharp` and entry `main.fsx`; the loader follows the manifest's `EntryPath`, + so nested or renamed script paths remain valid. - Compile-time references follow the runtime order: framework shared layer, package-local DLLs, the loader directory (for dependencies such as `FSharp.Core`), then trusted platform assemblies. - Cache keys cover source text, `#load` and local `#r` inputs, package-local DLLs, compiler version,