LlmsArtifactContentService
Pennington.LlmsTxt
Artifact-tier façade over LlmsTxtService: one service owning every llms URL — the root /llms.txt front door (and optional /llms-full.txt), the per-subtree {prefix}/llms.txt indexes (a mid-path territory only a SuffixClaim can express — endpoint routing would let a content route's {slug} segment capture them), and the per-page {OutputDirectory}/{path}.md sidecars. Serves dev requests through the artifact router and enumerates the same files for the static build. Transient so each resolution captures the current file-watched service.
Properties
ClaimsImmutableList<ArtifactClaim>- URL territories this service serves. Options-derived and consulted on every request — must be cheap and must not trigger discovery, the projection, or any lazy corpus work.
Constructors
LlmsArtifactContentService
#public LlmsArtifactContentService(LlmsTxtService service, LlmsTxtOptions options)
Creates the façade; claims derive from the options alone.
Parameters
serviceLlmsTxtServiceoptionsLlmsTxtOptions
Methods
DiscoverAsync
#public IAsyncEnumerable<DiscoveredItem> DiscoverAsync()
Enumerates every artifact route the static build should write, as GeneratedSource items. May consume the projection — the build invokes this outside any request, after the page crawl has primed the render cache. Never called on the request path.
Returns
IAsyncEnumerable<DiscoveredItem>ResolveAsync
#public Task<ArtifactContent> ResolveAsync(string relativePath, CancellationToken cancellationToken)
Returns the bytes for relativePath (no leading slash, e.g. search/en/index.json), or null to decline so the request falls through to content routing. May materialize the projection, build an index, or run Chromium on demand.
Parameters
relativePathstringcancellationTokenCancellationToken
Returns
Task<ArtifactContent>Pennington.LlmsTxt.LlmsArtifactContentService
namespace Pennington.LlmsTxt;
/// Artifact-tier façade over LlmsTxtService: one service owning every llms URL — the root /llms.txt front door (and optional /llms-full.txt), the per-subtree {prefix}/llms.txt indexes (a mid-path territory only a SuffixClaim can express — endpoint routing would let a content route's {slug} segment capture them), and the per-page {OutputDirectory}/{path}.md sidecars. Serves dev requests through the artifact router and enumerates the same files for the static build. Transient so each resolution captures the current file-watched service.
public class LlmsArtifactContentService
{
/// URL territories this service serves. Options-derived and consulted on every request — must be cheap and must not trigger discovery, the projection, or any lazy corpus work.
public ImmutableList<ArtifactClaim> Claims { get; }
/// Enumerates every artifact route the static build should write, as GeneratedSource items. May consume the projection — the build invokes this outside any request, after the page crawl has primed the render cache. Never called on the request path.
public IAsyncEnumerable<DiscoveredItem> DiscoverAsync()
;
/// Creates the façade; claims derive from the options alone.
public LlmsArtifactContentService(LlmsTxtService service, LlmsTxtOptions options)
;
/// Returns the bytes for relativePath (no leading slash, e.g. search/en/index.json), or null to decline so the request falls through to content routing. May materialize the projection, build an index, or run Chromium on demand.
public Task<ArtifactContent> ResolveAsync(string relativePath, CancellationToken cancellationToken)
;
}