LM-Kit.NET 2026.2.5

Released: Feb 16, 2026

2026.2.5 での更新項目

機能

  • Added Markdown conversion public APIs in LMKit.Document.Conversion:
    • New MarkdownHtmlConverter.MarkdownToHtml(string) method to convert Markdown to HTML.
    • New MarkdownHtmlConverter.HtmlToMarkdown(string) method to convert HTML back to Markdown.
    • New MarkdownDocxConverter.MarkdownToDocx(string) and MarkdownDocxConverter.MarkdownToDocxFile(string, string) methods to convert Markdown to DOCX.
    • New MarkdownDocxConverter.DocxToMarkdown(...) overloads for DOCX byte arrays and DOCX file paths.
    • Added comprehensive XML documentation and usage examples for each public member.
    • Added prebuilt agent tools convert_markdown_to_html and convert_html_to_markdown.
  • Added per-element confidence scores to extraction results:
    • New ConfidenceScore property on TextExtractionResultElement exposes a [0.0, 1.0] quality score computed from per-token probabilities during grammar-constrained generation.
    • New HumanVerificationRequired property on TextExtractionResult signals when any element falls below the configurable threshold.
    • New HumanVerificationThreshold property on TextExtraction (default 0.7) controls the verification flag.
  • Added extraction progress events:
    • New Progress event on TextExtraction reports phase transitions: OcrProcessing, Extracting, PostProcessing, Completed.
    • Reports per-pass index and total for multi-pass extraction of large documents.
    • New ExtractionPhase enum and ExtractionProgressEventArgs class.
  • Added entity auto-detection and validation for extraction results:
    • New EntityKind public enum (102 values) identifies the semantic kind of each extracted field (email, phone, IBAN, postal code, URI, etc.).
    • New DetectedEntityKind property on TextExtractionElement exposes the automatically inferred entity kind.
    • New Validation property on TextExtractionResultElement returns an EntityValidationResult with Status (Valid, Invalid, Repaired, NotApplicable), EntityKind, and OriginalValue (when repaired).
    • 14 entity kinds have dedicated format validators: email, phone, fax, URI, IBAN, SWIFT/BIC, IPv4, IPv6, MAC address, GUID/UUID, currency code, postal code, hostname.
    • Invalid extractions now contribute to HumanVerificationRequired flag alongside low confidence scores.
    • Validation results are tracked even when NullOnDoubt is disabled, enabling inspection without value nullification.
  • Added HTML-aware chunking for RAG workflows:
    • New HtmlChunking class implements IChunking with DOM-aware splitting using AngleSharp.
    • Respects semantic HTML boundaries: headings, sections, tables, preformatted blocks.
    • StripBoilerplate option (default: true) removes nav, footer, sidebar, and ad containers.
    • PreserveHeadingContext option (default: true) prepends heading breadcrumb trail to chunks.
    • Tables are extracted as pipe-delimited text and kept intact when they fit in a single chunk.
    • Oversized blocks are sub-split using the plain text partitioner with configurable overlap.
  • Added async PDF splitting and extraction APIs to improve SDK async coverage for file-heavy workflows:
    • Added ExtractPagesAsync overloads for file-path based extraction (pageRange and pageIndexes).
    • Added SplitToFilesAsync overloads for attachment and file-path workflows (including DocumentSplittingResult-based splitting).
    • All new async APIs support CancellationToken.
  • Added pattern-constrained extraction formatting (best-effort deterministic enforcement):
    • New TextExtractionElementFormat.Pattern supports regex patterns and compact descriptors such as 4N-26A2N-1A.
    • Pattern is now included in JSON Schema round-trip (SetElementsFromJsonSchema parse + JsonSchema generation).
    • Grammar generation now applies pattern constraints for String and StringArray fields when pattern conversion is supported.
    • Post-processing now validates extracted values against field patterns and rejects non-conforming values when validation is enabled.
  • Added standardized tool metadata via IToolMetadata interface:
    • All built-in tools now implement IToolMetadata, exposing Category, SideEffect, RiskLevel, DefaultApproval, IsIdempotent, and IsReadOnly.
    • New ToolSideEffect enum: None, LocalRead, LocalWrite, NetworkRead, NetworkWrite, Irreversible.
    • New ToolRiskLevel enum: Low, Medium, High, Critical.
    • New ToolApprovalMode enum: Never, Conditional, Always.
    • Custom ITool implementations may optionally implement IToolMetadata to participate in policy-based governance.
  • Added ToolPermissionPolicy for centralized tool access control:
    • Fluent API with Allow(), Deny(), AllowCategory(), DenyCategory(), RequireApproval(), RequireApprovalForCategory(), and SetMaxRiskLevel().
    • Supports wildcard patterns (e.g., Deny("fs.*")) and category-level rules.
    • Deny rules always take precedence over allow rules.
    • Configurable DefaultAction (Allow or Deny) for whitelist/blacklist modes.
    • New ToolPermissionResult enum: Allowed, Denied, ApprovalRequired.
  • Added tool approval workflow support:
    • New ToolApprovalRequestEventArgs event args class with ToolCall, Tool, RiskLevel, SideEffect, Approved, and DenialReason properties.
    • BeforeToolInvocationEventArgs now exposes Tool and PermissionResult properties for policy-aware interception.
  • Added ToolPermissionPolicy integration to ToolRegistry and AgentBuilder:
    • ToolRegistry.PermissionPolicy property for attaching a policy to the registry.
    • ToolRegistry.EvaluatePermission(ITool) method for programmatic policy checks.
    • AgentBuilder.WithPermissionPolicy() methods (direct and inline configuration).
  • Added metadata-aware query methods to BuiltInTools:
    • GetByMaxRisk(ToolRiskLevel): filter tools by maximum risk level.
    • GetByCategory(string): filter tools by category.
    • GetReadOnly(): get all read-only tools.
  • Enhanced ToolInfo with rich security metadata:
    • Now includes Category, SideEffect, RiskLevel, DefaultApproval, IsIdempotent, and IsReadOnly in addition to existing HasIOCapabilities.
  • Added pdf_search built-in document tool and reusable LMKit.Document.Pdf.PdfSearch API:
    • New built-in tool: pdf_search for searching text in PDF files with page ranges, case sensitivity, result limits, and contextual snippets.
    • PdfSearchTool now delegates to LMKit.Document.Pdf.PdfSearch (domain logic moved out of tool layer).
    • PdfSearch now uses existing LayoutSearchEngine + TextSearchOptions.
    • Added async-first API PdfSearch.FindTextAsync(...) and sync wrapper PdfSearch.FindText(...).
  • Added filesystem_search built-in IO tool for recursive file search:
    • Search files by name glob, content regex, size range, and modification date.
    • Configurable recursion depth, directory matching, and FileSystemToolOptions policy.
  • Added http_download built-in Net tool for streaming file downloads:
    • Download files from a URL to the local filesystem with streaming I/O and configurable size limits.
    • Supports custom headers, overwrite control, and partial file cleanup on failure.
  • Improved tool calling reliability across all models.
  • Breaking Changes - Split multi-operation built-in tools into atomic single-operation tools (1 tool = 1 feature):
    • All previously monolithic tools (FileSystemTool, ProcessTool, CompressTool, ClipboardTool, HttpTool, FtpTool, DatabaseTool, SpreadsheetTool) have been replaced by individual atomic tools, each performing exactly one operation.
    • PdfSplitTool now handles split operations only; new PdfExtractTool handles page extraction.
    • BuiltInTools factory properties updated: BuiltInTools.FileSystem is now BuiltInTools.FileSystemRead, BuiltInTools.HttpGet is now BuiltInTools.HttpGet, etc.
    • New group registration methods: AddFileSystemTools(), AddHttpTools(), AddProcessTools(), etc. via BuiltInToolsExtensions.
    • ToolPermissionPolicy wildcard patterns now work with atomic names: Allow("filesystem_*"), Deny("filesystem_delete"), RequireApproval("process_*").

不具合の修正

  • Fixed and improved GLM (glm4.7-flash) tool calling support.