Senparc.Xncf.PromptRange.Abstractions 0.3.2-preview6

Prefix Reserved
This is a prerelease version of Senparc.Xncf.PromptRange.Abstractions.
dotnet add package Senparc.Xncf.PromptRange.Abstractions --version 0.3.2-preview6
                    
NuGet\Install-Package Senparc.Xncf.PromptRange.Abstractions -Version 0.3.2-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="Senparc.Xncf.PromptRange.Abstractions" Version="0.3.2-preview6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Senparc.Xncf.PromptRange.Abstractions" Version="0.3.2-preview6" />
                    
Directory.Packages.props
<PackageReference Include="Senparc.Xncf.PromptRange.Abstractions" />
                    
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 Senparc.Xncf.PromptRange.Abstractions --version 0.3.2-preview6
                    
#r "nuget: Senparc.Xncf.PromptRange.Abstractions, 0.3.2-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 Senparc.Xncf.PromptRange.Abstractions@0.3.2-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=Senparc.Xncf.PromptRange.Abstractions&version=0.3.2-preview6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Senparc.Xncf.PromptRange.Abstractions&version=0.3.2-preview6&prerelease
                    
Install as a Cake Tool

Senparc.Xncf.PromptRange.Abstractions

Senparc.Xncf.PromptRange.Abstractions contains the event contracts shared by PromptRange and optional prompt-optimization or evaluation modules.

Features

  • Prompt initialization request/response events.
  • Prompt optimization request/response events with model-parameter context.
  • Prompt-test completion events carrying output, score, and evaluation metadata.
  • Immutable records that can cross NCF EventBus boundaries without a PromptRange implementation reference.

Installation

<PackageReference Include="Senparc.Xncf.PromptRange.Abstractions" Version="0.2.2-preview2" />

Key API

  • PromptInitRequestEvent and PromptInitResponseEvent correlate prompt initialization.
  • PromptOptimizationRequestEvent and PromptOptimizationResponseEvent carry optimization input, output, score, and error state.
  • OptimizationContext and OptimizedParameters describe model-generation parameters.
  • PromptTestFinishedEvent records a completed prompt test and evaluation result.
  • Skills/SkillContracts.cs defines the portable Skill catalog, execution, and package contracts.
  • Skills/SkillExceptions.cs defines explicit not-found and access-denied failures.

Skill portability

PromptRange exposes its versioned prompt tree as Skills through ISkillCatalog and ISkillExecutor. A Skill uses a stable SkillCode and a concrete PromptCode version (RangeName-Tactic-Aiming). Consumers such as AdminChat and AgentsManager should reference this abstractions package rather than PromptRange database entities.

Portable Skill packages are ZIP streams with a skill.json manifest and the Semantic Kernel-compatible config.json/skprompt.txt files. Secrets, provider credentials, and executable binaries must not be included in a package.

The PromptRange module registers the ISkillCatalog, ISkillExecutor, and ISkillPackageService implementations. Consumers may resolve these interfaces from dependency injection without referencing PromptRange entities.

External installation accepts a local ZIP upload or an HTTPS package URL. The package is validated for its manifest, size, archive paths, and executable content, then installed as Draft. An administrator must explicitly publish the imported PromptCode through the Skill management API before AdminChat or AgentsManager can execute it.

AdminChat exposes three Skill operations: list available Skills, load a selected Skill for the current turn, and execute it. After an administrator explicitly requests installation, AdminChat may call the HTTPS installation function; it only creates a Draft and never publishes or executes the newly installed Skill automatically.

Event payloads may contain prompts and model output. Apply authorization, tenant ownership, redaction, and retention controls before publishing or persisting them.

PromptCode reference integration

References/PromptReference.cs supplies optional, implementation-independent integration:

  • PromptReference: PromptItemId, exact full PromptCode, UTF-16 Start and Length. Store metadata separately from the original content; never send labels or scores to the LLM. ValidateRanges checks ordered, nonoverlapping spans, with a maximum of 32 references.
  • IPromptReferenceService.ValidateAsync additionally verifies the accessible version and exact text.
  • GetInfoAsync, ScoreAsync and ScoreWithAIAsync expose version-level information and scoring. Only AI and manual source scores exist; whichever was saved last becomes CurrentScore. Scores are 0–10, at most one decimal; -1 in info means unrated.
  • AI scoring requires a benchmark and a nonempty result; context/result each allow 64,000 characters. The caller must authorize the stored reference and the corresponding result, not accept arbitrary message IDs or another user's conversation. A missing provider must reject annotated submissions explicitly while leaving plain-text behavior unchanged.

The Admin shared components provide draft tracking, history labels, manual scoring and quick view. Hosts can supply their own authorized AI callback without a dependency on AdminChat entities. See the Admin integration guide.

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 (2)

Showing the top 2 NuGet packages that depend on Senparc.Xncf.PromptRange.Abstractions:

Package Downloads
Senparc.Xncf.PromptRange

你的提示词(Prompt)训练场

Senparc.Xncf.AgentsManager

Agents 管理模块

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.2-preview6 38 11/4/2026
0.3.1-preview6 86 11/2/2026
0.2.5-preview5 545 8/12/2026
0.2.4-preview4 134 8/8/2026
0.2.3-preview3 148 8/3/2026
0.2.2-preview2 264 7/26/2026
0.2.1-preview1 266 6/17/2026
0.1.2-preview1 150 6/16/2026
0.1.1-preview1 293 5/10/2026

[2026-07-26] v0.2.2-preview2 Dependency update from Senparc.Ncf.Shared.Abstractions to 0.3.0-preview2
     1、Dependency update from Senparc.Ncf.Shared.Abstractions to 0.3.0-preview2
     v0.1.0 创世
     [2026-08-04] v0.2.3-preview3 Dependency update from Senparc.Ncf.Shared.Abstractions to 0.4.0-preview3
     [2026-08-08] v0.2.4-preview4 Dependency update from Senparc.Ncf.Shared.Abstractions to 0.5.0-preview4
     [2026-08-13] v0.2.5-preview5 Dependency update from Senparc.Ncf.Shared.Abstractions to 0.6.0-preview5
     [2026-10-21] v0.3.0-preview6 扩展 Skill 契约,支持类型、测试隔离、风险策略与 Agent 绑定
     1、新增 SkillKind、测试隔离、风险等级与执行策略
     2、新增 ISkillTestRunner 与 AgentSkillBinding
     3、Skill 查询可按允许的 Skill 列表过滤
     [2026-11-02] Add the Memory updater prompt provider contract.
     [2026-11-03] v0.3.1-preview6 提供 Skill 包管理、来源文件和聊天记忆提示词契约
     [2026-11-04] Add portable PromptCode reference validation, score information and shared scoring provider contracts.