Penghou.Fuwen.Baize
0.1.0-preview.11
dotnet add package Penghou.Fuwen.Baize --version 0.1.0-preview.11
NuGet\Install-Package Penghou.Fuwen.Baize -Version 0.1.0-preview.11
<PackageReference Include="Penghou.Fuwen.Baize" Version="0.1.0-preview.11" />
<PackageVersion Include="Penghou.Fuwen.Baize" Version="0.1.0-preview.11" />
<PackageReference Include="Penghou.Fuwen.Baize" />
paket add Penghou.Fuwen.Baize --version 0.1.0-preview.11
#r "nuget: Penghou.Fuwen.Baize, 0.1.0-preview.11"
#:package Penghou.Fuwen.Baize@0.1.0-preview.11
#addin nuget:?package=Penghou.Fuwen.Baize&version=0.1.0-preview.11&prerelease
#tool nuget:?package=Penghou.Fuwen.Baize&version=0.1.0-preview.11&prerelease
Penghou.Fuwen
Penghou.Fuwen is a typed workflow language, compiler, and immutable intermediate representation for portable, artifact-driven AI workflows. It turns bounded, capability-reviewed source into a canonical executable plan. Penghou.Zhinu executes that plan durably; Fuwen does not replace the workflow engine.
Fuwen treats code, documents, datasets, research, media, model outputs, manifests, and validation evidence as typed immutable artifact references. Workflow source never embeds C#, Python, JavaScript, shell, credentials, or unrestricted filesystem access.
.fuwen source
-> bounded parser and semantic compiler
-> exact catalogue resolution and capability review
-> immutable canonical WorkflowPlan + execution fingerprint
-> host admission receipt
-> durable execution through Penghou.Fuwen.Zhinu
Why Fuwen
Fuwen makes the parts of an AI workflow that affect safety, reproducibility, and replay visible before execution:
- typed inputs, outputs, bindings, schemas, enums, and artifact references;
- exact version-and-digest pins for activities, contexts, inference profiles, prompt templates, and tools;
- workflow-owned prompts with typed parameters and canonical rendering;
- capability, resource-budget, callable-effect, idempotency, and retry checks;
- stable structural node identities, source maps, and execution fingerprints;
- bounded conditionals, keyed fan-out, repeat regions, checkpoints, and waits;
- immutable plan revisions and deterministic change explanations.
The host remains responsible for trusted catalogues, credentials, artifact storage, authorization, admission policy, and resource limits. Provider output is untrusted until it passes the declared Fuwen type.
Packages
All packages target .NET 8 and .NET 10.
| Package | Responsibility |
|---|---|
Penghou.Fuwen |
Immutable IR, type system, bindings, artifacts, identities, runtime values, execution ports, and evidence contracts |
Penghou.Fuwen.Compiler |
Bounded source parsing, formatting, catalogue resolution, validation, compilation, diagnostics, admission, and plan comparison |
Penghou.Fuwen.Zhinu |
Admission-bound durable interpretation of Fuwen plans on Penghou.Zhinu |
Penghou.Fuwen.Baize |
Exact descriptor-bound structured and media inference through Penghou.Baize |
Install only the layers your host needs:
dotnet add package Penghou.Fuwen.Compiler --prerelease
dotnet add package Penghou.Fuwen.Zhinu --prerelease
dotnet add package Penghou.Fuwen.Baize --prerelease
Current language and IR
The current source compiler emits the smallest IR version required by the
authored features, up to fuwen-ir/v8.
| IR | Added contract |
|---|---|
| v2 | Explicit structured execution order |
| v3 | Typed context requirements and runtime snapshot evidence |
| v4 | Bounded keyed fan-out with stable item identities |
| v5 | Value-producing conditional merges |
| v6 | Bounded state-carrying repeat regions |
| v7 | Checkpoint and external wait interaction gates |
| v8 | Workflow-owned prompts and declared inference tools |
The source language supports schemas, enums, capability declarations, typed workflows, context/activity/inference nodes, restricted bindings, conditionals, fan-out, repeat, checkpoints, waits, prompt declarations, toolsets, and complete typed returns.
A minimal IR v8 workflow looks like this:
prompt greet(name: string) {
system "Answer briefly."
user "Greet {{ name}}."
}
workflow greeting(input: string) -> string {
infer answer = infer
"sample.profile@1#dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
prompt greet(name: input;)
tools none
-> string;
return answer;
}
Descriptor pins are resolved against the host's trusted catalogue. Prompt and tool declarations are part of plan identity: changing their semantic content changes the execution fingerprint. Inference admits effect-free and read-only tools, plus retry-safe writes whose callable contract is idempotent.
See the authoring contract for the complete compact syntax and catalogue inputs. The capability matrix distinguishes complete, limited, deferred, and deliberately host-owned surfaces.
Compile, admit, execute
FuwenSourceCompiler lexes, parses, binds, resolves exact descriptors, applies
host and caller budgets, and lowers source through the same semantic validator
used for programmatic plans. A successful compilation returns a canonical
WorkflowPlan, diagnostics, source map, and resource-usage summary.
Compilation alone does not authorize execution. WorkflowAdmissionService
binds the exact execution fingerprint to:
- an immutable trusted-catalogue snapshot;
- resolved callable metadata and capabilities;
- the host policy revision and finite grants;
- the effective compilation limits.
The resulting opaque receipt is process-bound authority. Plan-revision documents and fingerprints prove identity and lineage; they do not grant capabilities or activate work.
Penghou.Fuwen.Zhinu supports IR v3 through v8. Its sequential interpreter
executes context, inference, activity, conditional, fan-out, repeat, checkpoint,
wait, and return semantics as stable Zhinu work. It verifies admission,
definition storage, runtime identity, and workflow fingerprints before
registration. Durable tests cover crash recovery, selective restart, focused
fan-out recovery, bounded loop replay, interaction gates, cancellation,
definition drift, corrupt evidence, and idempotent artifact publication.
Penghou.Fuwen.Baize resolves host-owned logical bindings to exact Baize
endpoints. It records provider/model identity, attempts, usage, duration,
pricing revision, tools, and artifact-publication evidence. Retries occur only
for explicitly classified representation or fallback failures.
Identity and evolution
Fuwen keeps three concepts separate:
- the canonical executable-plan fingerprint;
- the authored source identity and source map;
- the plan-revision lineage and supporting evidence.
This separation lets a host explain why a revision exists without allowing
prose, timestamps, or source formatting to perturb executable identity.
WorkflowExplanation and PlanRevisionComparer are deterministic inspection
surfaces; neither can authorize execution or reuse runtime artifacts.
The canonical formatter is idempotent. Comments and whitespace may change
during formatting, while the executable plan remains identical. Stable
diagnostic codes (FWN-*) and UTF-8 source spans are intended for bounded
machine-assisted repair.
Ecosystem boundaries
- Fuwen owns source syntax, typing, validation, immutable IR, fingerprints, source maps, admission, and diagnostics.
- Zhinu owns durable scheduling, retries, fencing, signals, restart, cancellation, child workflows, compensation, loops, and persistence.
- Baize owns provider-neutral model execution and provider provenance.
- Nuwa may repair malformed JSON; final Fuwen type validation still decides whether the value is accepted.
- Cangjie and Hetu provide memory and code/context knowledge through immutable references.
- Hongxian owns long-lived session continuity and correlation, not workflow execution.
- Hosts and artifact providers own bytes, storage, authorization, routing, credentials, and budgets.
Development
dotnet build Penghou.Fuwen.slnx --configuration Release
dotnet test Penghou.Fuwen.slnx --configuration Release --no-build
dotnet pack Penghou.Fuwen.slnx --configuration Release --no-build --output artifacts
Useful design references:
- Roadmap and delivery status
- Current capability matrix
- Bounded complex-activity direction
- Complex-inference implementation plan
- Execution ports
- Zhinu adapter boundary
- Runtime values and evidence
- Keyed fan-out
- Execution-port conformance
- Generated-asset publication
- Identity and fingerprints
- Threat model
The packages are preview software. Source syntax and public APIs may still change between preview releases; persisted plans remain governed by their explicit IR, compiler-semantics, canonicalization, and fingerprint versions.
License
Copyright (c) 2026 Jenő Konrád László
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Penghou.Baize (>= 0.3.0-preview.5)
- Penghou.Baize.Tools (>= 0.3.0-preview.5)
- Penghou.Fuwen (>= 0.1.0-preview.11)
- Penghou.Fuwen.Compiler (>= 0.1.0-preview.11)
- Penghou.Nuwa (>= 1.0.0)
-
net8.0
- Penghou.Baize (>= 0.3.0-preview.5)
- Penghou.Baize.Tools (>= 0.3.0-preview.5)
- Penghou.Fuwen (>= 0.1.0-preview.11)
- Penghou.Fuwen.Compiler (>= 0.1.0-preview.11)
- Penghou.Nuwa (>= 1.0.0)
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 |
|---|---|---|
| 0.1.0-preview.11 | 41 | 9/24/2026 |
| 0.1.0-preview.10 | 49 | 9/20/2026 |
| 0.1.0-preview.9 | 54 | 9/19/2026 |
| 0.1.0-preview.8 | 56 | 9/18/2026 |
| 0.1.0-preview.7 | 58 | 9/18/2026 |
| 0.1.0-preview.6 | 50 | 9/18/2026 |
| 0.1.0-preview.5 | 52 | 9/17/2026 |
| 0.1.0-preview.4 | 47 | 9/17/2026 |
| 0.1.0-preview.3 | 62 | 9/17/2026 |
| 0.1.0-preview.2 | 56 | 9/16/2026 |
| 0.1.0-preview.1 | 61 | 9/13/2026 |