AppSurface Search
API Reference

Cli

Type

AppSurfaceCliApp

Source

Provides the DI-backed execution runtime for AppSurface CLI commands.

Remarks

This internal runtime exists so the top-level tool entry point stays thin while command discovery, dependency registration, logging defaults, and CliFx execution stay testable. It discovers commands from the AppSurface CLI entry assembly, applies module and caller-provided service registrations, temporarily assigns CommandService.PrimaryServiceProvider for constructor-injected command dependencies, and always restores the previous provider after command execution.

Method

RunAsync

Task RunAsync(string[] args, Action<ConsoleOptions>? configureOptions = null) Source

Runs the AppSurface CLI with the provided command-line arguments.

Parameters

  • argsCommand-line arguments to parse and execute.
  • configureOptionsOptional callback that customizes ConsoleOptions before execution. Defaults start from ConsoleOptions.Default with ConsoleOutputMode.CommandFirst so command output remains the primary console experience.

Returns

A task that completes when the selected command finishes.

Remarks

Use this seam from process entry points and tests that need the real command pipeline without shelling out. The method builds and disposes a fresh service provider for each run, registers AppSurface CLI defaults, then applies custom registrations last so tests or future host integrations can replace defaults intentionally.

Method

AddExportEngineServices

void AddExportEngineServices(IServiceCollection services) Source

Registers the RazorWire export engine dependencies used by AppSurface-owned export commands.

Parameters

  • servicesThe service collection to populate.

Remarks

The named ExportEngine HTTP client disables automatic redirects so artifact-producing requests are surfaced to ExportEngine. The engine then applies its explicit redirect boundary checks before reading or writing redirected response bodies, while source and readiness probes continue to treat surfaced HTTP redirect responses as evidence that an app endpoint is reachable.

Method

AddPwaVerifierServices

void AddPwaVerifierServices(IServiceCollection services) Source

Registers the HTTP client used by appsurface pwa verify.

Parameters

  • servicesThe service collection to populate.

Remarks

Automatic redirects are disabled so the verifier observes the requested manifest, icon, diagnostics, and offline fallback URLs directly. That keeps the verifier's same-origin and base-path checks authoritative instead of letting HttpClient silently follow a redirect outside the app being verified.

Method

AddCoverageServices

void AddCoverageServices(IServiceCollection services) Source

Registers the shared coverage core and its CLI and Evidence adapters.

Parameters

  • servicesService collection receiving the coverage command and Evidence registrations.

Remarks

The conditionally linked coverage sources compile only into the private core. Public coverage commands use CLI-only presentation adapters at their boundary, while the first-party Evidence producer composes the same private-core services in process. Registering one shared graph preserves identical collection, merge, gate, and watchdog behavior for both entry points without duplicate service descriptors.

Method

AddCanaryPollingServices

void AddCanaryPollingServices(IServiceCollection services) Source

Registers the named-canary polling HTTP and delay services.

Parameters

  • servicesThe service collection to populate.

Remarks

The polling workflow owns all visible attempt and deadline behavior, so this client disables redirects and has no client-level timeout. Each workflow dispatch receives its own linked per-attempt token instead.

Type

CoverageRunDriverInvocation

Source

Describes one driver's raw and canonical artifact locations for a project invocation.

Parameters

  • DriverThe single driver selected for the run.
  • ProjectOutputDirectoryThe AppSurface-owned canonical directory for this project.
  • RawResultsDirectoryThe unique collector attachment directory, or null for MSBuild.
  • OwnedArgumentsArguments generated by AppSurface that callers must not override.
Type

CoverageRunDriverNormalization

Source

Result of normalizing one driver's current-invocation coverage artifact.

Parameters

  • StatusStable artifact outcome: produced, missing, multiple, unreadable, escaping, or malformed.
  • CoverageFileCanonical absolute Cobertura path when Status is produced.
  • CauseStable diagnostic detail for a non-produced outcome, otherwise null.
  • CleanupDiagnosticBest-effort staged-file cleanup warning that did not change the primary normalization outcome.
Type

CoverageRunDriverPreflight

Source

Validates VSTest engine and direct package capabilities before coverage output is mutated.

Method

ValidateAsync

Task ValidateAsync(CoverageRunDriver driver, string configuration, CoverageProjectResolution resolution, ICoverageRunProcessRunner processRunner, CoverageRunWatchdogSupervisor supervisor, CancellationToken cancellationToken) Source

Validates the selected engine and every selected project's evaluated coverage package.

Parameters

  • driverThe requested VSTest coverage driver.
  • configurationThe evaluated build configuration.
  • resolutionThe resolved solution and selected test projects.
  • processRunnerRunner used for supervised MSBuild capability queries.
  • supervisorRun-scoped supervisor for discovery operations and cancellation.
  • cancellationTokenCancellation token for capability evaluation.

Returns

A task that completes when every project is compatible.

Remarks

Throws a stable coverage execution diagnostic for an engine incompatibility or aggregated project package and capability failures in stable project order.

Method

DriverName

string DriverName(CoverageRunDriver driver) Source

Returns the stable lowercase CLI name for a coverage driver.

Parameters

  • driverThe coverage driver value.

Returns

collector or msbuild.

Type

CoverageRunDriverStrategy

Source

Owns coverage-driver arguments and deterministic per-project artifact normalization.

Method

ValidateTestArguments

void ValidateTestArguments(CoverageRunDriver driver, IReadOnlyList<string> arguments) Source

Validates user arguments that would override AppSurface-owned coverage behavior.

Parameters

  • driverThe driver whose reserved arguments should be enforced.
  • argumentsUser-supplied dotnet test arguments in invocation order.

Remarks

Throws a stable coverage execution diagnostic when an argument collides with driver-owned coverage configuration.

Method

CreateInvocation

CoverageRunDriverInvocation CreateInvocation(CoverageRunRequest request, string projectOutputDirectory) Source

Creates driver-owned arguments and raw artifact locations for one project invocation.

Parameters

  • requestThe validated coverage-run request.
  • projectOutputDirectoryAbsolute AppSurface-owned output directory for the project.

Returns

The driver invocation, including its unique collector directory when applicable.

Remarks

Throws a stable coverage execution diagnostic when a generated collector invocation directory collides with an existing filesystem object.

Method

AppendCollectorRunSettings

void AppendCollectorRunSettings(CoverageRunRequest request, List<string> arguments) Source

Appends collector runsettings after user-controlled pre-separator arguments.

Parameters

  • requestThe validated coverage-run request.
  • argumentsMutable dotnet test argument list to complete.
Method

NormalizeAsync

Task<bool> NormalizeAsync(CoverageRunDriverInvocation invocation, int processExitCode, string logFile, CancellationToken cancellationToken, Action<Action>? commitGate = null) Source

Normalizes the current invocation's driver artifact into the canonical project path.

Parameters

  • invocationThe driver invocation and its artifact locations.
  • processExitCodeExit code from the corresponding dotnet test process.
  • logFileProject log path included in artifact diagnostics.
  • cancellationTokenCancellation token for artifact inspection and staging.
  • commitGateOptional gate that must authorize canonical artifact replacement.

Returns

true when the current invocation produced a canonical artifact; otherwise false.

Remarks

Throws a stable coverage execution diagnostic when a successful test process produces an invalid artifact result.

Method

NormalizeDetailedAsync

Task<CoverageRunDriverNormalization> NormalizeDetailedAsync(CoverageRunDriverInvocation invocation, CancellationToken cancellationToken, Action<Action>? commitGate = null, Action? beforeArtifactOpen = null, Action<string>? deleteStagedFile = null) Source

Normalizes an artifact and returns a stable status without selecting the run's primary failure.

Parameters

  • invocationThe driver invocation and its artifact locations.
  • cancellationTokenCancellation token for artifact inspection and staging.
  • commitGateOptional gate that must authorize canonical artifact replacement.
  • beforeArtifactOpenOptional test seam invoked after candidate discovery and before the artifact is opened.
  • deleteStagedFileOptional test seam that replaces deletion of the staged coverage file.

Returns

A stable normalization status and the canonical absolute artifact path only when produced.

Method

CreateArtifactFailure

Exception CreateArtifactFailure(string logFile, string rawDirectory, string cause) Source

Creates the stable artifact-contract diagnostic used by workflow-level failure ordering.

Parameters

  • logFileProject log path included in the diagnostic.
  • rawDirectoryRaw or canonical artifact directory that failed validation.
  • causeStable artifact failure detail.

Returns

An ASCOV115 command failure.

Enum

CoverageRunDriver

Source

Coverage integrations supported by the VSTest-based coverage run workflow.

Type

ProgramEntryPoint

Source

Internal CLI entry point that adds a scoped test seam around AppSurfaceCliApp.

Remarks

Production code uses RunAsync directly. Tests can use PushConfigureOptionsOverrideForTests to add temporary console or DI overrides without changing the top-level statement in Program.cs.

Method

RunAsync

Task RunAsync(string[] args, Action<ConsoleOptions>? configureOptions = null) Source

Runs the AppSurface CLI with the specified arguments and optional console configuration.

Parameters

  • argsCommand-line arguments to parse and execute.
  • configureOptionsOptional primary console-options callback for the current invocation.

Returns

A task that represents the CLI execution.

Method

PushConfigureOptionsOverrideForTests

IDisposable PushConfigureOptionsOverrideForTests(Action<ConsoleOptions> configureOptions) Source

Pushes a test-only console-options override for the current async context.

Parameters

  • configureOptionsOverride callback to apply after any direct invocation callback.

Returns

A disposable scope that restores the previous override when disposed.

Remarks

Always dispose the returned scope, typically with using var. Overrides compose with RunAsync callbacks in direct-then-override order so tests can replace services after production defaults are configured.

Type

RestoreOverrideScope

Source

Restores the previously active test override when disposed.

Parameters

  • previousOverride that was active before the current scope was pushed.
Type

CoverageConsoleAdapters

Source

Adapts the CliFx console to the private coverage-core writer boundary.

Remarks

Command handlers use the same writer pair directly. These overloads retain the intentional internal test seam for existing coverage workflow tests while ensuring the core itself has no dependency on CliFx.

Method

RunAsync

Task<CoverageRunResult> RunAsync(this CoverageRunWorkflow workflow, CoverageRunRequest request, IConsole console, CancellationToken cancellationToken) Source

Runs coverage using the output and error writers from a CliFx console.

Method

MergeAsync

Task<CoverageMergeResult> MergeAsync(this CoverageMergeWorkflow workflow, CoverageMergeRequest request, IConsole console, CancellationToken cancellationToken) Source

Merges coverage using the output and error writers from a CliFx console.

Type

CanaryPollCommand

Source

Polls one protected AppSurface named-canary endpoint until it produces a terminal deployment decision.

Remarks

This command is read-only. It evaluates application-owned evidence already exposed by the protected Web endpoint; it does not trigger a workflow, change traffic, perform a rollback, or replace health and readiness probes.

Property

Url

string? Url { get; set; } Source

Gets the absolute application base URL.

Property

Name

string? Name { get; set; } Source

Gets the registered named-canary name.

Property

MarkerEnvironmentVariable

string? MarkerEnvironmentVariable { get; set; } Source

Gets the environment variable containing the optional canary marker.

Property

FreshSince

string? FreshSince { get; set; } Source

Gets the optional proof freshness boundary.

Property

BearerTokenEnvironmentVariable

string? BearerTokenEnvironmentVariable { get; set; } Source

Gets the environment variable containing a bearer token.

Property

IdentityTokenEnvironmentVariable

string? IdentityTokenEnvironmentVariable { get; set; } Source

Gets the environment variable containing an already acquired identity token.

Property

HeaderEnvironmentVariables

string[] HeaderEnvironmentVariables { get; set; } Source

Gets repeatable custom header environment sources in HEADER=VARIABLE form.

Property

Timeout

string Timeout { get; set; } Source

Gets the total polling deadline.

Property

Interval

string Interval { get; set; } Source

Gets the interval between scheduled polls.

Property

MaxTransientFailures

int MaxTransientFailures { get; set; } Source

Gets the maximum consecutive recoverable transport failures.

Property

Json

bool Json { get; set; } Source

Gets whether to write exactly one machine-readable JSON terminal result.

Property

GithubSummary

bool GithubSummary { get; set; } Source

Gets whether to write a GitHub Actions step summary when available.

Property

NoGithubSummary

bool NoGithubSummary { get; set; } Source

Gets whether to suppress GitHub Actions step summary output.

Type

CanaryPollWorkflow

Source

Coordinates deterministic named-canary polling without hidden HTTP retries.

Method

RunAsync

Task<CanaryPollResult> RunAsync(CanaryPollRequest request, CancellationToken cancellationToken) Source

Runs the caller-owned named-canary polling state machine.

Type

ICanaryPollDelay

Source

Performs one caller-owned delay in the polling state machine.

Method

DelayAsync

Task DelayAsync(TimeSpan delay, CancellationToken cancellationToken) Source

Waits for the requested duration or cancellation.

Type

TimeProviderCanaryPollDelay

Source

Uses the configured time provider for production polling delays.

Type

ICanaryPollHttpClient

Source

Issues one named-canary HTTP request without following redirects.

Method

SendAsync

Task<CanaryPollHttpResponse> SendAsync(CanaryPollRequest request, CancellationToken cancellationToken) Source

Sends exactly one request and returns bounded response evidence.

Type

CanaryPollHttpClient

Source

Adapts the typed HTTP client to the polling workflow's bounded response contract.

Type

CanaryPollHttpResponse

Source

Captures one bounded named-canary HTTP response.

Type

CanaryPollRetryAfter

Source

Captures a parsed Retry-After header without retaining raw header text.

Type

CanaryPollEnvelopeParser

Source

Parses the required named-canary compatibility core.

Method

Parse

CanaryPollEnvelope Parse(byte[] body, string expectedName) Source

Parses a bounded response and validates it against the requested canary name.

Type

CanaryPollEnvelope

Source

Represents the parsed safe fields required by the polling state machine.

Type

CanaryPollProtocolException

Source

Represents a protocol incompatibility without exposing response content.

Type

CanaryPollRequestFactory

Source

Normalizes safe command options and resolves environment-sourced values.

Method

Create

CanaryPollRequest Create(string? urlText, string? name, string? markerEnvironmentVariable, string? freshSinceText, string? bearerTokenEnvironmentVariable, string? identityTokenEnvironmentVariable, IReadOnlyList<string>? headerEnvironmentVariables, string? timeoutText, string? intervalText, int maxTransientFailures) Source

Creates a fully normalized request before any HTTP connection is opened.

Method

IsSafeSummary

bool IsSafeSummary(string? summary) Source

Returns whether a server summary is safe to expose in terminal evidence.

Type

CanaryPollRequest

Source

Contains normalized request metadata and non-renderable environment-sourced values.

Type

CanaryPollHeader

Source

Contains one non-renderable custom HTTP header.

Type

CanaryPollInputException

Source

Represents a safe local command-input failure.

Type

CanaryPollResult

Source

Represents one safe terminal polling result.

Property

IsRetryable

bool IsRetryable { get; } Source

Gets whether a retry can produce a different deployment decision without changing local input.

Type

CanaryPollResultRenderer

Source

Renders one safe terminal result for a person or an automation client.

Method

WriteAsync

Task WriteAsync(IConsole console, CanaryPollResult result, bool json) Source

Writes exactly one terminal result to stdout.

Type

CanaryPollGithubSummaryWriter

Source

Appends a bounded, safe result table to a GitHub Actions step summary.

Method

TryWriteAsync

Task<bool> TryWriteAsync(string? path, CanaryPollResult result) Source

Attempts summary output without changing the polling result.

Type

AppSurfaceCliVersion

Source

Resolves the AppSurface CLI version string shown by appsurface --version.

Remarks

The .NET tool package version is the user-facing release identity. Runtime assemblies carry that value through AssemblyInformationalVersionAttribute, sometimes with a leading release-tag v or build metadata. This helper normalizes the display value while preserving prerelease labels so RC installs remain distinguishable from stable packages.

Method

ResolveDisplayVersion

string ResolveDisplayVersion(Assembly assembly) Source

Resolves the display version from the supplied assembly metadata.

Parameters

  • assemblyAssembly whose informational version carries the package identity.

Returns

A single-line printable version suitable for CliFx --version output.

Method

NormalizeDisplayVersion

string NormalizeDisplayVersion(string? informationalVersion) Source

Normalizes package identity metadata for user-facing CLI version output.

Parameters

  • informationalVersionRaw assembly informational version.

Returns

The package SemVer display value without a leading release-tag v or build metadata, or a truthful fallback when package identity metadata is unavailable.

Type

DocsCommand

Source

Previews AppSurface Docs for a local repository through the public appsurface docs command.

Remarks

This command starts the AppSurface Docs standalone host with CLI-friendly defaults and delegates option validation and argument construction to AppSurfaceDocsPreviewCommand.

Type

DocsPreviewCommand

Source

Previews AppSurface Docs for a local repository through the appsurface docs preview alias.

Remarks

Use this alias when a command hierarchy reads better in scripts. It has the same options and behavior as DocsCommand.

Type

DocsExportCommand

Source

Exports AppSurface Docs for a local repository through the appsurface docs export command.

Remarks

This command owns the AppSurface Docs source-host lifecycle and delegates static crawling, URL rewriting, CDN validation, and materialization to the RazorWire export engine.

Method

ExecuteAsync

2 overloads
ValueTask ExecuteAsync(IConsole console) Source

Executes the command through the CliFx console integration.

Parameters

  • consoleConsole abstraction used to register cancellation handling.

Returns

A value task that completes when export finishes or command validation fails.

ValueTask ExecuteAsync(CancellationToken cancellationToken) Source

Executes the command using an explicit cancellation token.

Parameters

  • cancellationTokenToken observed while starting the host and exporting static output.

Returns

A value task that completes when export finishes.

Method

BuildExportArgs

AppSurfaceDocsExportArgs BuildExportArgs() Source

Translates CLI options into an AppSurface Docs export invocation.

Returns

The export runner arguments.

Remarks

Export defaults to Production and binds a loopback ephemeral port internally. It does not expose preview's --urls or --port options because humans and CI should not manage export listener ports.

Method

BuildDefaultSeedRoutes

IReadOnlyList<string> BuildDefaultSeedRoutes() Source

Builds the default export seed routes from the resolved AppSurface Docs routing options.

Returns

The root route plus the live docs root, with duplicates removed.

Property

OutputPath

string OutputPath { get; set; } Source

Gets the directory where static docs files will be written.

Remarks

Defaults to dist/docs for local use. CI should pass an explicit output path so upload artifacts and export output stay tied together.

Property

Mode

ExportMode Mode { get; set; } Source

Gets the export mode used by the underlying RazorWire exporter.

Remarks

ExportMode.Cdn validates and rewrites output for static CDN hosting. ExportMode.Hybrid preserves application-style internal URLs for server-backed deployments.

Property

LiveOrigin

string? LiveOrigin { get; set; } Source

Gets the live origin used for RazorWire-managed live references in hybrid exports.

Remarks

This option is only needed for split-origin hybrid output. The value must be an absolute http or https origin with no path, query string, fragment, or userinfo. When configured, RazorWire-owned live surfaces such as streams, islands, and lazy anti-forgery form posts are rewritten to this origin while docs navigation and canonical routes remain on the static docs host. Leave it unset when the published docs and live app share an origin.

Property

HybridCredentials

RazorWireHybridCredentialsMode HybridCredentials { get; set; } Source

Gets credential behavior for RazorWire-managed live references.

Remarks

Defaults to RazorWireHybridCredentialsMode.Auto, which includes credentials when LiveOrigin is set and omits them otherwise. Choose RazorWireHybridCredentialsMode.Include for cookie-backed live docs interactions across origins. Choose RazorWireHybridCredentialsMode.Omit only for public live endpoints that do not need cookies or lazy anti-forgery token refresh.

Property

RedirectStrategy

ExportRedirectStrategy RedirectStrategy { get; set; } Source

Gets the redirect alias materialization strategy used by the underlying RazorWire exporter.

Remarks

ExportRedirectStrategy.Html is the default and works on GitHub Pages and generic static hosts by writing alias HTML fallback files. ExportRedirectStrategy.Netlify writes a root _redirects file for Netlify-compatible CDN hosting and is valid only with ExportMode.Cdn.

Property

SeedRoutesPath

string? SeedRoutesPath { get; set; } Source

Gets an optional path to a seed-route file.

Remarks

This option is long-only because -r is reserved for --repo across AppSurface docs commands. When omitted, export derives default seeds from the configured docs routing surface.

Type

DocsVerifyArchiveCommand

Source

Verifies one catalog-pinned AppSurface Docs release archive without starting a web host.

Remarks

This command exercises the same catalog and archive verification path used at runtime so operators can diagnose manifest, digest, and file drift locally before deploying a version catalog change.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console) Source

Executes the command through the CliFx console integration.

Parameters

  • consoleConsole abstraction used to register cancellation handling.

Returns

A value task that completes after archive verification.

Property

CatalogPath

string? CatalogPath { get; set; } Source

Gets the path to the AppSurface Docs version catalog JSON file.

Property

Version

string? Version { get; set; } Source

Gets the version identifier to verify from the catalog.

Property

TrustedReleaseRootPath

string? TrustedReleaseRootPath { get; set; } Source

Gets the trusted release root used to resolve catalog exactTreePath entries.

Type

DocsVerifyHealthCommand

Source

Verifies AppSurface Docs harvest health for CI and release gates.

Remarks

This command loads the standalone docs host service graph, reads the same redacted health response shape as the JSON endpoint, and fails when the machine-checkable health response is not OK.

Method

ExecuteAsync

2 overloads
ValueTask ExecuteAsync(IConsole console) Source

Executes the command through the CliFx console integration.

Parameters

  • consoleConsole abstraction used to register cancellation handling.

Returns

A value task that completes when verification finishes.

ValueTask ExecuteAsync(CancellationToken cancellationToken) Source

Executes the command using an explicit cancellation token.

Parameters

  • cancellationTokenToken observed while loading host services and reading harvest health.

Returns

A value task that completes when verification finishes.

Method

BuildVerifyArgs

AppSurfaceDocsHealthVerifyArgs BuildVerifyArgs() Source

Translates CLI options into a one-shot harvest-health verification invocation.

Returns

The health verification runner arguments.

Property

RequireCompleteEventDoclets

bool RequireCompleteEventDoclets { get; set; } Source

Gets a value indicating whether public JavaScript event doclets must include complete event contract fields.

Remarks

This forwards AppSurfaceDocs:Harvest:JavaScript:RequireCompleteEventDoclets=true into the verification host without changing runtime startup failure semantics.

Property

VerifyEventDispatches

bool VerifyEventDispatches { get; set; } Source

Gets a value indicating whether public JavaScript event doclets should be compared with literal CustomEvent dispatch evidence.

Remarks

This forwards AppSurfaceDocs:Harvest:JavaScript:VerifyEventDispatches=true into the verification host. Mismatches remain warning-only diagnostics; the command prints them on successful verification runs.

Type

AppSurfaceDocsPreviewCommand

Source

Shared implementation for AppSurface Docs preview commands.

Remarks

The base command translates CLI options into AppSurface Docs standalone host arguments. It keeps command parsing separate from process hosting so tests can verify validation and argument forwarding without starting Kestrel.

Method

ExecuteAsync

2 overloads
ValueTask ExecuteAsync(IConsole console) Source

Executes the command through the CliFx console integration.

Parameters

  • consoleConsole abstraction used to register cancellation handling.

Returns

A value task that completes when the preview host exits or command validation fails.

ValueTask ExecuteAsync(CancellationToken cancellationToken) Source

Executes the command using an explicit cancellation token.

Parameters

  • cancellationTokenToken observed before the host runner starts.

Returns

A value task that completes when the preview host exits.

Remarks

This overload exists for tests and shared command execution paths that already own cancellation registration.

Property

Urls

string? Urls { get; set; } Source

Gets the explicit URL binding forwarded to the AppSurface Docs host.

Remarks

Use this for a full Kestrel binding such as http://127.0.0.1:5189. Prefer Port when only the port needs to change.

Property

Port

int? Port { get; set; } Source

Gets the port shortcut forwarded to the AppSurface Docs host.

Remarks

Use this for local preview scripts that only need a port override. Use Urls for explicit host, scheme, or multi-binding scenarios.

Property

AllHosts

bool AllHosts { get; set; } Source

Gets a value indicating whether the port shortcut should bind all hosts instead of localhost only.

Remarks

Use this only with Port when LAN, container, or other non-loopback preview access is intentional.

Type

AppSurfaceDocsRepositoryCommand

Source

Shared repository, routing, environment, and startup-timeout options for AppSurface docs commands.

Remarks

Preview and export share these options so route and source configuration cannot drift. Preview adds listener binding options, while export keeps listener management internal and adds output/export options instead.

Method

BuildHostArgs

2 overloads
AppSurfaceDocsHostArgs BuildHostArgs(string? defaultEnvironmentName) Source

Translates shared CLI options into standalone AppSurface Docs host arguments.

Parameters

  • defaultEnvironmentNameEnvironment to use when EnvironmentName is blank.

Returns

The repository root, forwarded host arguments, startup timeout, and resolved environment.

AppSurfaceDocsHostArgs BuildHostArgs(string? urls, int? port, bool allHosts, string? defaultEnvironmentName) Source

Translates shared and preview-only CLI options into standalone AppSurface Docs host arguments.

Parameters

  • urlsOptional explicit preview URL binding.
  • portOptional preview port shortcut.
  • allHostsWhether the preview port shortcut should bind all hosts instead of localhost only.
  • defaultEnvironmentNameEnvironment to use when EnvironmentName is blank.

Returns

The repository root, forwarded host arguments, startup timeout, and resolved environment.

Property

RepositoryRoot

string RepositoryRoot { get; set; } Source

Gets the repository root to harvest.

Remarks

Defaults to the current directory. Use this when running the CLI from a parent directory, script workspace, or package output folder. The value must resolve to an existing directory.

Property

StrictHarvest

bool StrictHarvest { get; } Source

Gets a value indicating whether startup should fail when every configured AppSurface Docs harvester fails.

Property

RouteRootPath

string? RouteRootPath { get; set; } Source

Gets the route-family root for AppSurface Docs version and archive routes.

Remarks

Use this when the docs route family is mounted somewhere other than /docs, for example --route-root /reference. Pair it with DocsRootPath when the live docs path should differ from archive/version routes.

Property

DocsRootPath

string? DocsRootPath { get; set; } Source

Gets the live docs root path.

Remarks

Use this to serve current docs under a nested route, for example --route-root /reference --docs-root /reference/next. Leave unset to use AppSurface Docs defaults.

Property

PublicOrigin

string? PublicOrigin { get; set; } Source

Gets the public origin used for absolute AppSurface Docs canonical metadata.

Remarks

Use this for published docs exports when the public host is known, for example --public-origin https://docs.example.com. Configure only the origin; route paths such as /docs come from RouteRootPath and DocsRootPath.

Property

EnvironmentName

string? EnvironmentName { get; set; } Source

Gets the host environment forwarded to the AppSurface Docs standalone host.

Remarks

Preview defaults to Development so the host can use deterministic per-workspace local endpoints. Export defaults to Production before starting the in-process host.

Property

StartupTimeoutSeconds

double StartupTimeoutSeconds { get; set; } Source

Gets the number of seconds to wait for the web host to start before failing fast.

Remarks

Defaults to 10 seconds. Set to 0 to disable the startup watchdog. Negative, infinite, and NaN values are rejected before the host starts.

Type

CurrentDirectoryScope

Source

Restores the previous process current directory when disposed.

Remarks

The standalone host resolves some relative paths from the current directory, so preview and export temporarily scope it to the repository root while the host runs.

Method

ChangeTo

CurrentDirectoryScope ChangeTo(string directory) Source

Changes the process current directory and returns a scope that restores the previous value.

Parameters

  • directoryDirectory to make current for the scope lifetime.

Returns

A disposable scope that restores the previous current directory.

Method

Dispose

void Dispose() Source

Restores the current directory captured when the scope was created.

Type

AppSurfaceDocsStrictRepositoryCommand

Source

Shared repository command options for AppSurface docs commands that expose strict harvest startup behavior.

Property

StrictHarvestEnabled

bool StrictHarvestEnabled { get; set; } Source

Gets or sets a value indicating whether startup should fail when every configured AppSurface Docs harvester fails.

Remarks

This is a source-harvest fail-closed gate. Static artifact validation is controlled separately by docs export --mode cdn. The option is intentionally omitted from docs verify-health, which keeps startup permissive and evaluates the health endpoint response instead.

Type

AppSurfaceDocsHostArgs

Source

Describes the AppSurface Docs host invocation produced by the CLI option translator.

Parameters

  • RepositoryRootAbsolute repository root that the AppSurface Docs host should harvest.
  • ArgsCommand-line arguments forwarded to the standalone AppSurface Docs host.
  • StartupTimeoutStartup watchdog timeout, or null when disabled.
  • EnvironmentNameResolved host environment, or null when the host should use its default.
Type

AppSurfaceDocsExportArgs

Source

Describes a one-shot AppSurface Docs static export request.

Parameters

  • HostArgsStandalone AppSurface Docs host arguments.
  • OutputPathAbsolute output directory for exported files.
  • SeedRoutesPathOptional absolute seed-route file path.
  • InitialSeedRoutesOptional in-memory seed routes used when SeedRoutesPath is null.
  • ModeRazorWire static export mode.
  • RedirectStrategyRedirect alias materialization strategy carried into the RazorWire export context. ExportRedirectStrategy.Html is the command default and writes portable fallback HTML pages for source-shaped aliases. Use ExportRedirectStrategy.Netlify only with ExportMode.Cdn when publishing to Netlify or a compatible host that reads a root _redirects file; export rejects that provider strategy with ExportMode.Hybrid because the generated rules target publish-root static routes. The selected strategy affects only alias materialization after the loopback host is crawled from RequestedBaseUrl.
  • RequestedBaseUrlLoopback URL passed to Kestrel. The default uses port 0 so the OS chooses a free port.
  • HybridOptionsOptional split-origin hybrid settings forwarded into the RazorWire export context.
Type

AppSurfaceDocsHealthVerifyArgs

Source

Describes a one-shot AppSurface Docs harvest-health verification request.

Parameters

  • HostArgsStandalone AppSurface Docs host arguments.
  • HealthJsonPathApp-relative health JSON path represented by this verification run.
  • RequestedBaseUrlLoopback URL passed to Kestrel. The default uses port 0 so the OS chooses a free port.
Type

AppSurfaceDocsHealthVerificationResult

Source

Result returned by the AppSurface Docs harvest-health verification runner.

Parameters

  • HealthParsed health response from the docs host.
  • HttpStatusCodeHTTP status code that the health endpoint would return for this health response.
Type

AppSurfaceDocsHealthHttpResponse

Source

Raw HTTP response returned by the AppSurface Docs harvest-health client seam.

Parameters

  • StatusCodeHTTP status returned by the health endpoint.
  • BodyResponse body read from the health endpoint.
Type

AppSurfaceDocsCliHost

Source

Applies shared host options required by packaged AppSurface docs tooling.

Method

ConfigurePackagedToolHost

void ConfigurePackagedToolHost(WebOptions options, TimeSpan? startupTimeout) Source

Configures the standalone AppSurface Docs host shape used by packaged preview and export commands.

Parameters

  • optionsWeb startup options to mutate.
  • startupTimeoutStartup watchdog timeout, or null when disabled.
Method

ConfigureQuietPreviewLogging

void ConfigureQuietPreviewLogging(ILoggingBuilder logging) Source

Suppresses routine ASP.NET Core host lifecycle output for interactive AppSurface Docs preview runs.

Parameters

  • loggingLogging builder for the preview host.

Remarks

The CLI prints the resolved docs URL itself after Kestrel starts, so routine messages such as Now listening on, Application started, AppSurface Web's endpoint fallback note, and routine docs harvest summaries would duplicate that command-owned status. Warnings and errors remain visible so startup and request failures are not hidden.

Type

IAppSurfaceDocsHostRunner

Source

Starts a AppSurface Docs host for CLI preview commands.

Remarks

This seam keeps command parsing and validation testable without starting a real web host. Production implementations should honor cancellation before delegating into long-running host lifetimes.

Method

RunAsync

Task RunAsync(string[] args, TimeSpan? startupTimeout, CancellationToken cancellationToken) Source

Runs the AppSurface Docs host with translated command-line arguments.

Parameters

  • argsArguments forwarded to the standalone AppSurface Docs host.
  • startupTimeoutStartup watchdog timeout, or null to disable it.
  • cancellationTokenToken that cancels before the host is started.

Returns

A task that completes when the host exits.

Type

IAppSurfaceDocsExportRunner

Source

Starts the AppSurface Docs host and exports it to static files.

Method

ExportAsync

Task ExportAsync(AppSurfaceDocsExportArgs args, CancellationToken cancellationToken) Source

Starts the docs host, runs static export, and stops the host.

Parameters

  • argsResolved export arguments.
  • cancellationTokenToken observed during host startup and export.

Returns

A task that completes when export finishes.

Type

IAppSurfaceDocsHealthVerifyRunner

Source

Loads the AppSurface Docs host service graph and verifies the redacted harvest-health response.

Method

VerifyAsync

Task<AppSurfaceDocsHealthVerificationResult> VerifyAsync(AppSurfaceDocsHealthVerifyArgs args, CancellationToken cancellationToken) Source

Starts the docs host, reads harvest health, and stops the host.

Parameters

  • argsResolved verification arguments.
  • cancellationTokenToken observed during host startup and health retrieval.

Returns

The parsed harvest-health verification result.

Type

IAppSurfaceDocsHealthHttpClient

Source

Reads the AppSurface Docs harvest-health JSON endpoint.

Method

GetAsync

Task<AppSurfaceDocsHealthHttpResponse> GetAsync(string url, CancellationToken cancellationToken) Source

Requests a redacted health JSON URL and returns the body regardless of success or failure HTTP status.

Parameters

  • urlAbsolute health JSON URL.
  • cancellationTokenToken observed by the HTTP request.

Returns

The HTTP status and body.

Type

IAppSurfaceDocsHealthHostStarter

Source

Builds and starts the AppSurface Docs host used by harvest-health verification.

Method

BuildAndStartAsync

Task<IHost> BuildAndStartAsync(AppSurfaceDocsHealthVerifyArgs args, string environmentName, CancellationToken cancellationToken) Source

Builds the standalone docs host, starts Kestrel, and returns the started host for health verification.

Parameters

  • argsResolved verification arguments.
  • environmentNameResolved host environment.
  • cancellationTokenToken observed while starting the host.

Returns

The started host.

Type

IRazorWireStaticExporter

Source

Adapts the RazorWire static exporter behind a small AppSurface CLI test seam.

Method

ExportAsync

Task ExportAsync(ExportContext context, CancellationToken cancellationToken) Source

Exports the started docs host described by context.

Parameters

  • contextRazorWire export context.
  • cancellationTokenToken observed by the export operation.

Returns

A task that completes when export finishes.

Type

IAppSurfaceDocsExportContextConfigurator

Source

Adds AppSurface Docs-specific export graph state after the host starts and before RazorWire crawls it.

Method

ConfigureAsync

Task ConfigureAsync(IHost host, ExportContext context, CancellationToken cancellationToken) Source

Configures the export context using services from the started docs host.

Parameters

  • hostStarted AppSurface Docs host.
  • contextExport context to configure.
  • cancellationTokenToken observed while resolving host state.

Returns

A task that completes after context configuration.

Type

AppSurfaceDocsStandaloneHostRunner

Source

Production IAppSurfaceDocsHostRunner that delegates to the standalone AppSurface Docs web host.

Remarks

Use this adapter for the packaged AppSurface CLI path. Tests should prefer fake runners so they can verify argument translation without starting Kestrel. The type is internal and sealed because callers should depend on IAppSurfaceDocsHostRunner rather than subclassing host lifetime behavior.

Type

ExceptionFilters

Source

Shared exception classification helpers used by command cleanup and best-effort diagnostics.

Method

IsNonFatal

bool IsNonFatal(Exception ex) Source

Determines whether an exception is safe to catch for cleanup, fallback logging, or diagnostic reporting.

Parameters

  • exException to classify.

Returns

true when the exception is non-fatal and can be handled locally.

Type

IAppSurfaceDocsHarvestSummaryReader

Source

Reads a command-owned harvest summary from a started AppSurface Docs preview host.

Method

ReadAsync

Task<AppSurfaceDocsHarvestSummary?> ReadAsync(IHost host, CancellationToken cancellationToken) Source

Reads the current docs harvest summary if the started host exposes the AppSurface Docs aggregator.

Parameters

  • hostStarted preview host.
  • cancellationTokenToken observed while waiting for the first cached docs snapshot.

Returns

A summary when available; otherwise null.

Type

AppSurfaceDocsHarvestSummary

Source

Concise harvest summary emitted by the AppSurface Docs CLI preview command.

Parameters

  • StatusAggregate harvest status.
  • TotalDocsNumber of final documentation nodes in the cached snapshot.
  • TotalHarvestersNumber of active harvesters that participated in the snapshot.
  • SuccessfulHarvestersNumber of harvesters that completed successfully.
  • DiagnosticCountNumber of structured harvest diagnostics in the snapshot.
Type

AppSurfaceDocsHarvestSummaryReader

Source

Production IAppSurfaceDocsHarvestSummaryReader that reads DocAggregator health.

Type

AppSurfaceDocsPreviewHostArgs

Source

Describes a preview AppSurface Docs host startup request.

Parameters

  • ArgsArguments forwarded to the standalone AppSurface Docs host.
  • StartupTimeoutStartup watchdog timeout, or null when disabled.
Type

IAppSurfaceDocsPreviewHostStarter

Source

Builds and starts the AppSurface Docs preview host.

Method

BuildAndStartAsync

Task<IHost> BuildAndStartAsync(AppSurfaceDocsPreviewHostArgs args, CancellationToken cancellationToken) Source

Builds the standalone docs host, starts Kestrel, and returns the started host for preview.

Parameters

  • argsResolved preview arguments.
  • cancellationTokenToken observed while starting the host.

Returns

The started host.

Type

AppSurfaceDocsStandalonePreviewHostStarter

Source

Production IAppSurfaceDocsPreviewHostStarter that uses the AppSurface Docs standalone host builder.

Type

IAppSurfaceDocsBrowserLauncher

Source

Attempts to open the preview docs URL in the user's browser.

Method

TryOpenAsync

Task<AppSurfaceDocsBrowserLaunchResult> TryOpenAsync(Uri url, CancellationToken cancellationToken) Source

Attempts to open url in the user's browser without failing the preview command.

Parameters

  • urlAbsolute docs URL to open.
  • cancellationTokenToken observed before launch.

Returns

The browser launch outcome.

Type

AppSurfaceDocsBrowserLaunchResult

Source

Describes the outcome of an attempted browser launch.

Parameters

  • SucceededWhether a platform launch command was started successfully.
  • FailureReasonUser-facing failure detail when Succeeded is false.
Method

Failure

AppSurfaceDocsBrowserLaunchResult Failure(string reason) Source

Creates a failed browser-launch result.

Parameters

  • reasonUser-facing failure detail.

Returns

A failed browser-launch result.

Property

Success

AppSurfaceDocsBrowserLaunchResult Success { get; } Source

Gets a successful browser-launch result.

Type

SystemAppSurfaceDocsBrowserLauncher

Source

Browser launcher that uses the current operating system's conventional URL opener.

Type

IAppSurfaceDocsBrowserOpenCommandRunner

Source

Runs the platform command that asks the operating system to open a browser URL.

Method

OpenAsync

Task OpenAsync(Uri url, CancellationToken cancellationToken) Source

Opens the given URL with the platform opener command.

Parameters

  • urlAbsolute URL to open.
  • cancellationTokenToken observed while starting the opener command.

Returns

A task that completes when the opener command exits.

Type

CliWrapAppSurfaceDocsBrowserOpenCommandRunner

Source

CliWrap-backed IAppSurfaceDocsBrowserOpenCommandRunner implementation.

Type

AppSurfaceDocsPreviewUrlResolver

Source

Resolves browser-facing URLs for AppSurface Docs preview hosts.

Method

ResolveRepositoryRoot

string ResolveRepositoryRoot(IReadOnlyList<string> args, string fallbackRoot) Source

Resolves the repository root forwarded to the standalone host.

Parameters

  • argsArguments forwarded to the standalone host.
  • fallbackRootFallback root used when the forwarded arguments do not contain a repository root.

Returns

The forwarded repository root when present; otherwise fallbackRoot.

Method

ResolveDefaultPreviewUrl

string? ResolveDefaultPreviewUrl(IReadOnlyList<string> args, string repositoryRoot) Source

Resolves the default preview listener when the CLI invocation did not configure an endpoint explicitly.

Parameters

  • argsArguments forwarded to the standalone host.
  • repositoryRootRepository root used as the deterministic-port seed.

Returns

A localhost URL, or null when explicit endpoint configuration should win.

Method

ResolveBoundBaseUrl

2 overloads
string ResolveBoundBaseUrl(IHost host) Source

Resolves the browser-facing base URL from Kestrel's published server addresses.

Parameters

  • hostStarted host that exposes Kestrel server addresses.

Returns

The scheme and authority that should be opened in the browser.

string ResolveBoundBaseUrl(ICollection<string>? addresses) Source

Resolves the browser-facing base URL from Kestrel's published server addresses.

Parameters

  • addressesPublished server addresses.

Returns

The scheme and authority that should be opened in the browser.

Method

ResolveDocsUrl

Uri ResolveDocsUrl(string baseUrl, IReadOnlyList<string> args) Source

Combines the bound host base URL with the configured AppSurface Docs root path.

Parameters

  • baseUrlBound host base URL.
  • argsArguments forwarded to the standalone host.

Returns

The absolute docs page URL to open.

Type

AppSurfaceDocsInProcessExportRunner

Source

Production export runner that starts the standalone AppSurface Docs host in-process and exports it over real loopback HTTP.

Method

ResolveBoundBaseUrl

2 overloads
string ResolveBoundBaseUrl(IHost host) Source

Resolves the single bound loopback base URL published by the started export host.

Parameters

  • hostStarted host that exposes Kestrel server addresses.

Returns

The scheme and authority used by the export crawler.

Exceptions

  • InvalidOperationExceptionThrown when the host does not publish exactly one valid loopback URL.
string ResolveBoundBaseUrl(ICollection<string>? addresses) Source

Resolves the crawler base URL from a Kestrel address collection.

Parameters

  • addressesPublished server addresses.

Returns

The absolute URL authority to crawl.

Exceptions

  • InvalidOperationExceptionThrown when no URL, multiple URLs, an invalid URL, or a non-loopback URL is published.
Method

BuildAndStartHostWithTimeoutAsync

Task<IHost> BuildAndStartHostWithTimeoutAsync(AppSurfaceDocsExportArgs args, string environmentName, CancellationToken cancellationToken) Source

Builds and starts the docs host while enforcing the configured startup watchdog.

Parameters

  • argsResolved export arguments.
  • environmentNameEnvironment name applied to the standalone host.
  • cancellationTokenExternal cancellation token for the export operation.

Returns

The started host.

Exceptions

  • TimeoutExceptionThrown when the host does not start before the startup timeout.
Method

CreateStartupTimeout

StartupTimeoutCancellationLease CreateStartupTimeout(TimeSpan startupTimeout, CancellationToken cancellationToken) Source

Creates the linked cancellation source used to distinguish startup timeout from external cancellation.

Parameters

  • startupTimeoutStartup timeout to enforce.
  • cancellationTokenExternal cancellation token to link.

Returns

A disposable lease for the linked startup cancellation source.

Method

ObserveTimedOutStartupTask

void ObserveTimedOutStartupTask(Task<IHost> startTask, CancellationTokenSource startupTimeoutCts) Source

Observes a startup task that outlived the configured timeout so late completion can stop or log the host.

Parameters

  • startTaskBackground startup task to observe.
  • startupTimeoutCtsCancellation source transferred from the timeout branch.
Method

ObserveCanceledStartupTask

void ObserveCanceledStartupTask(Task<IHost> startTask, CancellationTokenSource startupTimeoutCts) Source

Observes a startup task that outlived external cancellation so late completion can stop or log the host.

Parameters

  • startTaskBackground startup task to observe.
  • startupTimeoutCtsCancellation source transferred from the external cancellation branch.
Method

ObserveStartupTaskAsync

Task ObserveStartupTaskAsync(Task<IHost> startTask, CancellationTokenSource startupTimeoutCts, string lateCompletionMessage) Source

Awaits a late startup task and disposes the host if startup eventually succeeds.

Parameters

  • startTaskBackground startup task to observe.
  • startupTimeoutCtsCancellation source owned by the observation task.
  • lateCompletionMessageDebug message used when late startup faults.

Returns

A task that completes after the late startup task is observed.

Method

CreateStartupTimeoutException

TimeoutException CreateStartupTimeoutException(TimeSpan startupTimeout, Exception? innerException) Source

Creates the user-facing timeout exception for a host that failed to start in time.

Parameters

  • startupTimeoutTimeout that elapsed.
  • innerExceptionOptional cancellation exception that came from the startup token.

Returns

The timeout exception reported to command execution.

Method

StopAndDisposeHostAsync

Task StopAndDisposeHostAsync(IHost host) Source

Stops the export host and always disposes it, logging non-fatal shutdown failures.

Parameters

  • hostHost to stop and dispose.

Returns

A task that completes after shutdown and disposal.

Type

StartupTimeoutCancellationLease

Source

Owns a startup cancellation source until timeout observation needs to transfer that ownership.

Method

CancelAsync

Task CancelAsync() Source

Requests cancellation of the owned startup cancellation source.

Returns

A task that completes after cancellation callbacks have run.

Method

Transfer

CancellationTokenSource Transfer() Source

Transfers cancellation source ownership to a late-startup observer.

Returns

The owned cancellation source.

Method

Dispose

void Dispose() Source

Disposes the owned cancellation source unless ownership has been transferred.

Property

Token

CancellationToken Token { get; } Source

Gets the token exposed by the owned startup cancellation source.

Type

AppSurfaceDocsHealthHttpClient

Source

Production harvest-health HTTP client used by AppSurfaceDocsInProcessHealthVerifyRunner.

Type

AppSurfaceDocsStandaloneHealthHostStarter

Source

Production IAppSurfaceDocsHealthHostStarter that uses the AppSurface Docs standalone host builder.

Type

FixedEnvironmentProvider

Source

Provides a fixed environment name to the standalone host builder during health verification startup.

Method

GetEnvironmentVariable

string? GetEnvironmentVariable(string name, string? defaultValue = null) Source

Gets environment variable values while overriding ASP.NET and .NET environment variables.

Parameters

  • nameEnvironment variable name.
  • defaultValueFallback value when the variable is not set.

Returns

The fixed host environment for environment-name variables, otherwise the process value or fallback.

Property

Environment

string Environment { get; } Source

Gets the fixed environment name.

Property

IsDevelopment

bool IsDevelopment { get; } Source

Gets a value indicating whether the fixed environment is Development.

Type

AppSurfaceDocsInProcessHealthVerifyRunner

Source

Starts AppSurface Docs in-process and verifies the redacted harvest-health response over loopback HTTP.

Type

AppSurfaceDocsExportContextConfigurator

Source

Default AppSurface Docs export configurator that publishes docs route aliases into RazorWire's export graph and captures the frozen route manifest alongside the static output.

Type

NoOpAppSurfaceDocsExportContextConfigurator

Source

Test-seam configurator used when unit tests provide a fake host that does not contain AppSurface Docs services.

Type

IAppSurfaceDocsExportHostStarter

Source

Builds and starts the in-process AppSurface Docs export host.

Method

BuildAndStartAsync

Task<IHost> BuildAndStartAsync(AppSurfaceDocsExportArgs args, string environmentName, CancellationToken cancellationToken) Source

Builds the standalone docs host, starts Kestrel, and returns the started host for export.

Parameters

  • argsResolved export arguments.
  • environmentNameResolved host environment.
  • cancellationTokenToken observed while starting the host.

Returns

The started host.

Type

AppSurfaceDocsStandaloneExportHostStarter

Source

Production IAppSurfaceDocsExportHostStarter that uses the AppSurface Docs standalone host builder.

Type

FixedEnvironmentProvider

Source

Provides a fixed environment name to the standalone host builder during export startup.

Method

GetEnvironmentVariable

string? GetEnvironmentVariable(string name, string? defaultValue = null) Source

Gets environment variable values while overriding ASP.NET and .NET environment variables.

Parameters

  • nameEnvironment variable name.
  • defaultValueFallback value when the variable is not set.

Returns

The fixed host environment for environment-name variables, otherwise the process value or fallback.

Property

Environment

string Environment { get; } Source

Gets the fixed environment name.

Property

IsDevelopment

bool IsDevelopment { get; } Source

Gets a value indicating whether the fixed environment is Development.

Type

RazorWireExportEngineAdapter

Source

Production IRazorWireStaticExporter that delegates to RazorWire's ExportEngine.

Type

CoverageCleanCommand

Source

Previews or explicitly removes stale AppSurface coverage artifacts.

Remarks

Without --all, this command uses the AppSurface coverage ownership marker to remove only known artifacts from the selected coverage output directory. --all is an intentional broader maintenance operation that scans a worktree for every directory named TestResults. Both modes preview by default and require --apply before changing the filesystem.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console, CancellationToken cancellationToken) Source

Executes the cleanup with an explicit cancellation token.

Parameters

  • consoleConsole used for user-visible output.
  • cancellationTokenCancellation token observed during filesystem traversal.

Returns

A task that completes after the preview or deletion summary is written.

Property

OutputDirectory

string? OutputDirectory { get; set; } Source

Gets or sets the AppSurface coverage output directory cleaned by the default mode.

Property

All

bool All { get; set; } Source

Gets or sets a value indicating whether every descendant TestResults directory should be included.

Remarks

This is broader than the default ownership-marker mode. It is intended for reclaiming disk space from a bounded local worktree and honors RootDirectory.

Property

RootDirectory

string? RootDirectory { get; set; } Source

Gets or sets the scan root used only by --all.

Property

Apply

bool Apply { get; set; } Source

Gets or sets a value indicating whether the previewed artifacts may be deleted.

Type

SecretsTransferCommand

Source

Provides the discoverable root for declared, value-safe secret-transfer commands.

Type

SecretsTransferPlanCommand

Source

Creates a value-free transfer plan for one declared endpoint job.

Type

SecretsTransferApplyCommand

Source

Applies one previously-created and still-valid secret-transfer plan.

Type

PwaVerifyCommand

Source

Verifies that a running web app exposes AppSurface-compatible PWA install or push-readiness evidence.

Property

Url

string? Url { get; set; } Source

Gets the app origin or URL to verify.

Property

BaseUrl

string? BaseUrl { get; set; } Source

Gets the app base URL to verify.

Property

EntryPath

string EntryPath { get; set; } Source

Gets the app-root-relative entry path whose HTML should expose the manifest link or push registration helper.

Property

Surface

string Surface { get; set; } Source

Gets the verification surface. Install retains the schema-v2 default contract.

Property

ExpectedPush

string? ExpectedPush { get; set; } Source

Gets the expected server-known push posture for push or all verification.

Property

DiagnosticsPath

string? DiagnosticsPath { get; set; } Source

Gets the app-root-relative PWA diagnostics base path.

Property

ExpectedStartUrl

string? ExpectedStartUrl { get; set; } Source

Gets the expected manifest start_url value.

Property

ExpectedScope

string? ExpectedScope { get; set; } Source

Gets the expected manifest scope value.

Property

ExpectedDisplay

string? ExpectedDisplay { get; set; } Source

Gets the expected manifest display mode.

Property

ExpectedThemeColor

string? ExpectedThemeColor { get; set; } Source

Gets the expected manifest theme_color value.

Property

ExpectedBackgroundColor

string? ExpectedBackgroundColor { get; set; } Source

Gets the expected manifest background_color value.

Property

ExpectedIcons

string[] ExpectedIcons { get; set; } Source

Gets expected icon size tokens, optionally followed by a purpose after a colon.

Property

Json

bool Json { get; set; } Source

Gets a value indicating whether machine-readable JSON should be written.

Type

PwaVerifier

Source
Method

VerifySurfaceAsync

Task<PwaVerificationV3Report> VerifySurfaceAsync(PwaVerificationOptions options, CancellationToken cancellationToken) Source

Verifies the additive schema-v3 push or combined readiness surface without modifying the default install path.

Type

IPwaVerificationHttpClient

Source

Fetches verifier resources without automatically following redirects.

Remarks

Redirect custody stays with PwaVerifier so origin and path-base boundaries are checked before each hop.

Method

GetAsync

Task<PwaHttpResponse> GetAsync(Uri uri, int maxBodyBytes, CancellationToken cancellationToken) Source

Fetches one response and reads no more than the requested body limit.

Parameters

  • uriThe absolute resource URI.
  • maxBodyBytesThe maximum response-body bytes retained for evidence.
  • cancellationTokenCancels the network request and bounded body read.

Returns

The response metadata and bounded body.

Type

PwaVerificationHttpClient

Source

Adapts HttpClient to the verifier's bounded, redirect-aware fetch contract.

Parameters

  • httpClientA client configured with automatic redirect handling disabled.

Remarks

Enabling automatic redirects bypasses the verifier's same-origin and path-base checks.

Type

PwaHttpResponse

Source

Captures one bounded HTTP response before verifier-managed redirect handling.

Parameters

  • StatusCodeThe actual server status code.
  • ContentTypeThe response media type, or an empty string when absent.
  • BodyBytesThe retained response bytes, capped by the requested read limit.
  • RedirectLocationThe unmodified Location header value, when present.
  • BodyTruncatedWhether bytes beyond the configured read limit were discarded.
  • HeadersOnly the three response-header observations required by strict push verification, preserving duplicate values.
Method

HeaderValues

IReadOnlyList<string> HeaderValues(string name) Source

Gets bounded captured values for one strict-verification response header.

Property

IsSuccess

bool IsSuccess { get; } Source

Gets whether the actual response status is in the HTTP 2xx range.

Property

Body

string Body { get; } Source

Gets the retained body decoded as UTF-8 text.

Remarks

Binary consumers should use BodyBytes instead.

Type

PwaVerificationReport

Source

Represents schema-versioned PWA verification evidence written by the CLI.

Parameters

  • SchemaVersionThe JSON evidence schema version.
  • PassedWhether no error-severity diagnostics were recorded.
  • OriginThe verified scheme, host, and port without a path base.
  • BaseUrlThe verified application root, including its path base.
  • EntryPathThe app-root-relative entry path supplied to the verifier.
  • EntryUrlThe absolute entry URL resolved under BaseUrl.
  • ManifestPathThe app-origin-relative manifest path discovered or probed.
  • StartUrlThe manifest start_url value, when parsed.
  • ScopeThe manifest scope value, when parsed.
  • DisplayThe manifest display value, when parsed.
  • ThemeColorThe manifest theme_color value, when parsed.
  • BackgroundColorThe manifest background_color value, when parsed.
  • IconsBounded fetch and dimension evidence for manifest icons.
  • DiagnosticsStable diagnostics supporting the pass or failure result.

Remarks

Consumers should branch on SchemaVersion and diagnostic codes instead of parsing human-readable messages.

Type

PwaVerificationV3Report

Source

Represents the schema-v3 report used only for explicitly requested push or combined PWA readiness verification.

Type

PwaInstallEvidence

Source

Captures install observations embedded in a schema-v3 combined report.

Type

PwaPushEvidence

Source

Captures only server-known, privacy-safe push-readiness evidence.

Type

PwaWorkerEvidence

Source

Captures bounded shared-worker fetch evidence.

Type

PwaRegistrationHelperEvidence

Source

Captures bounded registration-helper discovery and fetch evidence.

Type

PwaVapidEvidence

Source

Captures the safe VAPID identity contributed by the optional Push package.

Type

PwaPushVerificationResult

Source

Pairs schema-v3 push evidence with diagnostics collected while verifying it.

Parameters

  • EvidenceThe bounded server-known push evidence.
  • DiagnosticsDiagnostics emitted while collecting the evidence.
Type

PwaNormalizedPushReadiness

Source

Holds validated readiness evidence or the sanitized unavailable state.

Parameters

  • ConfigurationStatusThe configured, not-configured, or unavailable readiness state.
  • ActiveVapidKeyIdThe safe active VAPID key identifier, when configured.
  • PublicKeyFingerprintThe safe SHA-256 public-key fingerprint, when configured.
  • RouteMappedWhether the package-owned route is mapped, or null when not evaluated.
Property

Unavailable

PwaNormalizedPushReadiness Unavailable { get; } Source

Gets the fixed redacted result used when readiness evidence cannot be trusted.

Type

PwaVerificationDiagnostic

Source

Represents one stable, structured PWA verification observation.

Parameters

  • CodeThe stable ASPWA2xx identifier.
  • SeverityThe lowercase error, warning, or info token.
  • MessageA human-readable explanation.
  • SubjectThe bounded manifest field or verifier surface involved.
  • ExpectedThe expected bounded value, when applicable.
  • ActualThe observed redacted value, when applicable.
  • FixA concise remediation, when known.
  • DocsUrlCanonical documentation for the diagnostic, when available.

Remarks

Do not place query strings, fragments, response bodies, or other secrets in structured evidence.

Type

PwaVerificationTarget

Source

Normalizes the trusted origin, application path base, and real entry route used by one verification run.

Parameters

  • OriginThe scheme, host, and port boundary.
  • BaseUriThe application root including its normalized path base.
  • BasePathThe normalized path base ending in a slash.
  • EntryPathThe validated app-root-relative entry path.
  • EntryUriThe entry path resolved beneath BaseUri.

Remarks

Query strings and fragments belong in neither the base URL nor entry path because verifier evidence intentionally excludes them.

Method

Create

PwaVerificationTarget Create(Uri url, string entryPath = "/") Source

Creates a normalized verification target after enforcing the URL and entry-path boundaries.

Parameters

  • urlAn absolute HTTP or HTTPS application root without a query or fragment.
  • entryPathAn app-root-relative path without traversal, query, fragment, or absolute URL syntax.

Returns

The normalized target used for all verifier requests.

Exceptions

  • ArgumentExceptionThe URL or entry path violates a verifier boundary.
Type

PwaVerificationOptions

Source

Carries normalized CLI assertions into a PWA verification run.

Parameters

  • BaseUrlThe absolute app root to verify.
  • EntryPathThe app-root-relative HTML entry route.
  • ExpectedStartUrlAn optional exact manifest start_url assertion.
  • ExpectedScopeAn optional exact manifest scope assertion.
  • ExpectedDisplayAn optional exact manifest display assertion.
  • ExpectedThemeColorAn optional exact manifest theme_color assertion.
  • ExpectedBackgroundColorAn optional exact manifest background_color assertion.
  • ExpectedIconsParsed icon size and purpose assertions.
  • SurfaceThe requested public verification surface.
  • ExpectedPushThe expected server-known push posture for schema-v3 surfaces.
  • DiagnosticsPathThe normalized app-root-relative PWA diagnostics base path.

Remarks

Target safety is enforced by PwaVerificationTarget.Create(Uri, string) before network access.

Method

Create

PwaVerificationOptions Create(Uri baseUrl, string entryPath = "/", string? expectedStartUrl = null, string? expectedScope = null, string? expectedDisplay = null, string? expectedThemeColor = null, string? expectedBackgroundColor = null, IReadOnlyList<string>? expectedIcons = null, string? surface = null, string? expectedPush = null, string? diagnosticsPath = null) Source

Creates verification options and parses repeated icon assertions.

Parameters

  • baseUrlThe absolute app root to verify.
  • entryPathThe app-root-relative entry route; blank values normalize to root.
  • expectedStartUrlAn optional exact start_url assertion.
  • expectedScopeAn optional exact scope assertion.
  • expectedDisplayAn optional exact display assertion.
  • expectedThemeColorAn optional exact theme_color assertion.
  • expectedBackgroundColorAn optional exact background_color assertion.
  • expectedIconsRepeated WIDTHxHEIGHT or WIDTHxHEIGHT:purpose assertions.
  • surfaceInstall (default), push, or all.
  • expectedPushEnabled (default) or disabled for push/all surfaces.
  • diagnosticsPathThe app-root-relative PWA diagnostics base path.

Returns

Normalized options for PwaVerifier.

Exceptions

  • ArgumentExceptionAn icon assertion is malformed.
Type

PwaVerificationSurfaceParser

Source

Parses the accepted install, push, and all PWA verification surface values.

Method

Parse

PwaVerificationSurface Parse(string? value) Source

Parses an optional PWA verification surface value.

Parameters

  • valueAn optional install, push, or all value.

Returns

The parsed surface; a missing value selects install.

Exceptions

  • ArgumentExceptionThe value is not install, push, or all.
Type

PwaExpectedPushParser

Source

Parses the accepted enabled and disabled push-expectation values.

Method

Parse

PwaExpectedPush Parse(string? value) Source

Parses an optional expected push posture value.

Parameters

  • valueAn optional enabled or disabled value.

Returns

The parsed posture; a missing value selects enabled.

Exceptions

  • ArgumentExceptionThe value is not enabled or disabled.
Type

PwaExpectedIcon

Source

Represents one explicit manifest icon size and optional purpose assertion.

Parameters

  • SizeA positive WIDTHxHEIGHT token.
  • PurposeAn optional manifest purpose token such as maskable.
Method

Parse

PwaExpectedIcon Parse(string value) Source

Parses a command-line icon assertion.

Parameters

  • valueWIDTHxHEIGHT or WIDTHxHEIGHT:purpose.

Returns

The parsed assertion.

Exceptions

  • ArgumentExceptionThe size or purpose token is malformed.
Method

ToString

string ToString() Source

Formats the assertion using its command-line token shape.

Returns

WIDTHxHEIGHT or WIDTHxHEIGHT:purpose.

Type

PwaFetchedResponse

Source

Captures the final verifier-managed fetch state after zero or more accepted redirects.

Parameters

  • FinalUriThe URI that produced Response.
  • ResponseThe actual final response without fabricated sentinel status codes.
  • RedirectLimitExceededWhether this response was an unfollowed redirect beyond the hop limit.

Remarks

Callers must not reinterpret Response as a terminal HTTP failure when RedirectLimitExceeded is true; ASPWA264 is the authoritative failure.

Method

HeaderValues

IReadOnlyList<string> HeaderValues(string name) Source

Gets bounded captured values for one strict-verification response header.

Property

StatusCode

HttpStatusCode StatusCode { get; } Source

Gets the actual final response status code.

Property

ContentType

string ContentType { get; } Source

Gets the actual final response media type.

Property

Body

string Body { get; } Source

Gets the retained final response body decoded as UTF-8.

Property

BodyBytes

byte[] BodyBytes { get; } Source

Gets the retained final response bytes.

Property

IsSuccess

bool IsSuccess { get; } Source

Gets whether the actual final response is in the HTTP 2xx range.

Type

PwaImageDimensions

Source

Represents dimensions decoded directly from a bounded PNG response.

Parameters

  • WidthThe positive pixel width.
  • HeightThe positive pixel height.
Type

PwaIconEvidence

Source

Represents privacy-safe fetch and optional PNG dimension evidence for one manifest icon.

Parameters

  • SourceThe manifest src value.
  • SizesThe manifest sizes token list.
  • TypeThe declared media type.
  • PurposeThe declared purpose token list.
  • PathThe fetched app-origin-relative path without query or fragment.
  • ContentTypeThe observed response media type.
  • WidthThe decoded PNG width, when available.
  • HeightThe decoded PNG height, when available.
  • FetchedWhether the icon returned an HTTP 2xx response.
Type

PwaManifestProbe

Source

Models the manifest fields required for install-readiness verification.

Parameters

  • NameThe manifest name.
  • ShortNameThe manifest short_name.
  • StartUrlThe manifest start_url.
  • ScopeThe manifest scope.
  • DisplayThe manifest display mode.
  • ThemeColorThe manifest theme_color.
  • BackgroundColorThe manifest background_color.
  • IconsThe manifest icon declarations.
Type

PwaIconProbe

Source

Models one manifest icon declaration without trusting it as fetched evidence.

Parameters

  • SourceThe manifest src value.
  • SizesThe space-delimited manifest sizes tokens.
  • TypeThe declared media type.
  • PurposeThe space-delimited manifest purpose tokens.
Type

PwaStatusProbe

Source

Models the server-known AppSurface PWA diagnostics used for install, worker, offline, and push posture checks.

Parameters

  • EnabledWhether AppSurface PWA metadata is enabled.
  • OfflineEnabledWhether the offline strategy is enabled.
  • ServiceWorkerPathThe active service-worker path when offline is enabled.
  • OfflineFallbackPathThe active offline fallback path when offline is enabled.
  • ConfiguredServiceWorkerPathThe configured worker path used to prove absence when offline is disabled.
  • WorkerEnabledWhether either offline or push configuration activates the shared service worker.
  • WorkerPathThe active shared service-worker path when a worker capability is enabled.
  • PushEnabledWhether push event handling is enabled in the shared service worker.
  • WorkerScopeThe effective registration scope for the shared service worker.
  • RegistrationHelperPathThe registration-helper path exposed when push is enabled.
  • PushReadinessThe additive schema-versioned safe readiness contribution, when supported by the server.

Remarks

These server-known values do not prove browser runtime capability or registration state.

Type

PwaPushReadinessProbe

Source

Models the versioned, sanitized push-readiness source object emitted by current Web servers.

Enum

PwaVerificationSurface

Source

Identifies the public PWA verification surface.

Enum

PwaExpectedPush

Source

Identifies the expected server-known push posture.

Type

CoverageCommandExceptionMapper

Source

Converts private coverage-core failures into the stable CliFx command contract.

Method

Map

CommandException Map(CoverageExecutionException exception) Source

Maps a core failure without changing its rendered diagnostic or terminal exit code.

Type

CoverageRunDiagnostics

Source

Creates stable command-layer validation diagnostics before a request enters the coverage core.

Method

Create

CommandException Create(string code, string problem, string cause, string fix, string docs, string? logPath = null) Source

Creates a stable CLI diagnostic using the existing coverage message shape.

Type

CoverageProjectManifest

Source

Writes the stable binding between one coverage-run project directory and the project that owns it.

Remarks

The manifest lets package-level proof select a known project report without reconstructing the runner's private slug allocation algorithm. It is emitted before the project's test process starts so a produced raw report is always adjacent to the identity that authorized the directory.

Schema version 1 records a normalized solution-relative project path and the slug allocated by CoverageRunWorkflow. Consumers must reject unknown schema versions and must not infer a project identity from the directory name alone.

Method

WriteAsync

Task WriteAsync(string projectOutputDirectory, string solutionDirectory, CoverageRunProject project, CancellationToken cancellationToken) Source

Writes the project-to-artifact-directory binding as a complete UTF-8 JSON document.

Parameters

  • projectOutputDirectoryExisting project artifact directory.
  • solutionDirectoryDirectory used to resolve and run the selected project.
  • projectSelected project with its allocated artifact slug.
  • cancellationTokenCancellation token for the staged write.

Returns

A task that completes after the manifest has been atomically promoted.

Type

SecretsCommand

Source

Provides the discoverable root for AppSurface local secret commands.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console) Source

Prints the local secrets command family summary.

Parameters

  • consoleCliFx console used for command output.

Returns

A completed task.

Type

SecretsInitCommand

Source

Initializes or verifies a LocalSecrets namespace.

Type

SecretsSetCommand

Source

Writes a local secret value.

Property

Value

string? Value { get; set; } Source

Gets or sets the secret value.

Property

ReadFromStandardInput

bool ReadFromStandardInput { get; set; } Source

Gets or sets a value indicating whether to read the secret value from standard input.

Type

SecretsGetCommand

Source

Verifies a local secret exists without printing its value.

Type

SecretsListCommand

Source

Lists currently retrievable local secret names in a namespace.

Property

NamesOnly

bool NamesOnly { get; set; } Source

Gets or sets a value indicating whether to print only secret names.

Type

SecretsMigrateCommand

Source

Explicitly migrates readable legacy macOS LocalSecrets records into the current v2 Keychain namespace.

Remarks

The command is intentionally unavailable for deterministic file stores and other platforms. It never prints secret values, never deletes v1 records, and never overwrites an existing v2 record; use secrets set to update a canonical v2 value after migration.

Type

SecretsDeleteCommand

Source

Deletes one local secret.

Type

SecretsDoctorCommand

Source

Diagnoses LocalSecrets platform availability.

Type

SecretsCommandBase

Source

Shared options and helpers for local secret commands.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console) Source

Executes the command.

Parameters

  • consoleCliFx console used for command output.

Returns

A value task that completes when the command finishes.

Method

BuildContext

SecretsCommandContext BuildContext() Source

Builds a normalized command context.

Returns

The command context.

Method

CreatePlatformStore

IAppSurfaceLocalSecretStore CreatePlatformStore(AppSurfaceLocalSecretsOptions options) Source

Creates the OS-backed LocalSecrets store for commands that do not use the deterministic file store.

Parameters

  • optionsOptions derived from the CLI command line.

Returns

The platform-backed local secret store.

Method

WriteResultAsync

ValueTask WriteResultAsync(IConsole console, AppSurfaceLocalSecretResult result, string successVerb) Source

Writes a command result.

Parameters

  • consoleCliFx console used for command output.
  • resultThe local secret result.
  • successVerbThe success verb to display.

Returns

A value task that completes when output is written.

Remarks

LocalSecrets treats LocalSecretResultStatus.Missing as failure everywhere except doctor-style readiness probes that return a ready-class posture diagnostic. Keep that exception explicit when adding commands so ordinary missing secrets do not report success.

Property

ApplicationName

string ApplicationName { get; set; } Source

Gets or sets the AppSurface application identity.

Property

EnvironmentName

string EnvironmentName { get; set; } Source

Gets or sets the AppSurface environment identity.

Property

KeyPrefix

string? KeyPrefix { get; set; } Source

Gets or sets an optional LocalSecrets key prefix.

Property

StoreFile

string? StoreFile { get; set; } Source

Gets or sets an optional file-backed store path for deterministic examples and tests.

Property

SecretToolPath

string? SecretToolPath { get; set; } Source

Gets or sets an explicit Linux secret-tool executable path for nonstandard trusted installs.

Type

SecretsKeyCommandBase

Source

Shared options for commands that target one local secret key.

Method

Normalize

AppSurfaceLocalSecretIdentity Normalize(SecretsCommandContext context) Source

Normalizes the configured key into a local secret identity.

Parameters

  • contextThe command context.

Returns

The local secret identity.

Property

Key

string Key { get; set; } Source

Gets or sets the AppSurface config key.

Type

SecretsCommandContext

Source

Captures normalized command state.

Parameters

  • NormalizerIdentity normalizer.
  • StoreLocal secret store.
  • ApplicationNameNormalized application identity.
  • EnvironmentNormalized environment identity.
  • KeyPrefixNormalized optional key prefix.
Type

CoverageRunSlowTestDiagnosticsWriter

Source

Writes bounded failure-first test results and best-effort slow-test diagnostic artifacts for coverage run.

Remarks

The writer consumes AppSurface-managed JUnit files only. Parser problems are preserved as diagnostic warnings so slow-test reporting cannot change the coverage result.
  • Only the first managed JUnit artifact for a project is parsed; additional JUnit artifacts emit warnings.
  • WriteAsync may write artifacts twice when aggregation timing changes during the initial write.
  • Legacy or externally managed test-result files are not consumed.
  • Missing files and parser failures are reported as warnings instead of failing coverage.
  • Failure details and Markdown output are bounded so CI summaries remain within GitHub limits.
Method

CollectAsync

Task<CoverageRunSlowTestDiagnosticsReport> CollectAsync(IReadOnlyList<CoverageProjectRunResult> results, CancellationToken cancellationToken, Action<int>? observeProgress = null) Source

Parses managed JUnit files and builds a diagnostic report.

Parameters

  • resultsProject run results with managed test result artifact paths.
  • cancellationTokenCancellation token for artifact reads.
  • observeProgressOptional callback that receives positive parsing and aggregation progress counts.

Returns

Slow-test diagnostic report model.

Method

WriteAsync

Task<CoverageRunSlowTestDiagnosticsRun> WriteAsync(string stagedMarkdownPath, string stagedJsonPath, string artifactDirectory, CoverageRunSlowTestDiagnosticsReport report, Func<long> getAggregationSeconds, Func<long, decimal> calculateAggregationPercent, CancellationToken cancellationToken, Action<int>? observeProgress = null) Source

Writes diagnostics to private same-directory staging files while recording canonical artifact paths in their contents.

Parameters

  • stagedMarkdownPathUnique private Markdown path alongside its canonical destination.
  • stagedJsonPathUnique private JSON path alongside its canonical destination.
  • artifactDirectoryCanonical directory represented in returned and embedded artifact paths.
  • reportReport model returned by CollectAsync.
  • getAggregationSecondsReads elapsed diagnostic aggregation seconds.
  • calculateAggregationPercentCalculates aggregation overhead as a percent of runner time.
  • cancellationTokenCancellation token for artifact writes.
  • observeProgressOptional callback that receives positive staging progress counts.

Returns

Canonical artifact paths, high-level metadata, and private staging paths after the writes complete. The caller owns the returned staging paths: promote them to their canonical destinations or call TryDeleteStagedFile after a failed or cancelled promotion.

Method

TryDeleteStagedFile

void TryDeleteStagedFile(string path) Source

Best-effort deletes a staging or backup path created by this diagnostics operation.

Parameters

  • pathPrivate path whose removal is safe after its creation was confirmed.
Type

ProgressReportingStream

Source

Delegates stream operations while reporting positive byte counts from reads.

Remarks

This type remains internal so the diagnostics tests can verify that all delegated stream operations preserve the wrapped stream's behavior without relying on reflection.

Type

CoverageRunSlowTestDiagnosticsRun

Source

Written slow-test diagnostic artifact metadata.

Parameters

  • MarkdownPathCanonical Markdown destination recorded in the diagnostics.
  • JsonPathCanonical JSON destination recorded in the diagnostics.
  • AggregationSecondsElapsed time spent collecting and writing diagnostics.
  • AggregationPercentDiagnostic overhead relative to the coverage run.
  • WarningCountNumber of collected diagnostics warnings.
  • MetadataCompleteWhether all requested test metadata was collected.
  • ParserStatusesParse status for each managed JUnit artifact.
  • StagedMarkdownPathPrivate Markdown staging path the caller must promote or delete.
  • StagedJsonPathPrivate JSON staging path the caller must promote or delete.

Remarks

StagedMarkdownPath and StagedJsonPath are newly created private files. Once this record is returned, the caller is responsible for promoting or deleting them. Failed or cancelled writes clean up only staging files created by the writer.

Type

CoverageRunSlowTestDiagnosticsReport

Source

Slow-test diagnostic report before overhead fields are finalized.

Parameters

  • SchemaVersionVersion of the serialized diagnostics schema.
  • GeneratedAtUtcUTC time at which diagnostics aggregation completed.
  • MetadataCompleteWhether every requested managed JUnit artifact parsed without warnings.
  • JunitFileCountNumber of managed JUnit artifacts that were present during aggregation.
  • ProjectsPer-project execution and parser metadata.
  • TestCaseCountTotal number of parsed JUnit test cases.
  • FailedTestCaseCountNumber of parsed test cases with failed or error status.
  • ErrorTestCaseCountNumber of parsed test cases with error status.
  • SkippedTestCaseCountNumber of parsed skipped test cases.
  • FailedTestCasesBounded, stable failed and errored test-case details for CI triage.
  • TopTestCasesBounded, descending-duration test-case list for rendered artifacts.
  • WarningsBounded diagnostics warnings encountered during aggregation.
Type

CoverageRunSlowTestProject

Source

Project timing metadata included in slow-test diagnostics.

Type

CoverageRunJunitReadResult

Source

Best-effort parse result for one managed JUnit file.

Type

CoverageRunSlowTestCase

Source

Parsed JUnit test case timing and bounded failure evidence included in diagnostics.

Parameters

  • ClassNameJUnit class name.
  • NameJUnit test name.
  • SecondsOptional parsed test duration.
  • StatusParsed JUnit outcome.
  • ProjectSolution-relative project that emitted the JUnit result.
  • JunitFileManaged JUnit source file.
  • FailureDetailBounded failure message and stack trace for failed or errored tests.
Type

ReleaseCommand

Source

Provides the discoverable root for consumer-owned release-note workflows.

Remarks

The public release surface deliberately handles the collaborative authoring problem only: independent work can add isolated Markdown entries and one release owner can compose them deterministically. It does not create tags, publish packages, mutate GitHub Releases, or impose AppSurface's repository-specific release policy on a consumer project.

Type

CoverageRunOutputLease

Source

Holds the filesystem objects that lead to a coverage output directory while ownership is inspected and the directory is prepared. The lease prevents pathname validation from being separated from mutation by an ancestor rename or link replacement.

Method

Acquire

CoverageRunOutputLease Acquire(string outputPath, Func<int, uint, int>? unixFChmod = null, Func<int, string, int, int>? unixUnlinkAt = null) Source

Independently opens or creates every output-path component without following links.

Parameters

  • outputPathAbsolute output directory path.
  • unixFChmodOptional Unix permission operation used to verify marker-creation failures.
  • unixUnlinkAtOptional Unix unlink operation used to verify staged-artifact cleanup failures.

Returns

A lease retaining every opened component until disposal.

Method

AcquireExisting

CoverageRunOutputLease? AcquireExisting(string outputPath) Source

Independently opens every existing output-path component without creating a missing directory.

Parameters

  • outputPathAbsolute output directory path.

Returns

A retained lease, or null when the output directory does not exist.

Remarks

This is used by explicit coverage cleanup so a preview or cleanup of a missing output never creates an empty TestResults directory. Existing components are still opened without following links.

Method

ValidateExisting

void ValidateExisting(string outputPath) Source

Validates the existing path and output ownership without creating missing components.

Parameters

  • outputPathAbsolute output directory path.
Method

Prepare

void Prepare(bool clean, Action? beforeMutation, Action? beforeCleanup) Source

Revalidates ownership, optionally removes known artifacts, and creates the marker and projects directory through the retained output object.

Parameters

  • cleanWhether known artifacts should be removed.
  • beforeMutationOptional test seam called after acquisition and before mutation.
  • beforeCleanupOptional test seam called after authorization revalidation and before cleanup.
Method

CleanKnownOwnedArtifacts

CoverageOwnedCleanupPlan CleanKnownOwnedArtifacts(bool apply) Source

Returns AppSurface-owned entries that an explicit coverage clean operation may remove and, when requested, deletes them through this retained output-directory lease.

Parameters

  • applyWhether the known entries should be deleted after validation.

Returns

A marker-ownership result and the relative entries selected for cleanup.

Remarks

The method neither creates an ownership marker nor creates the projects directory. An empty unmarked directory therefore remains a no-op, while a populated unmarked directory still fails closed through ValidateOwnedTree.

Method

ValidateOwnedGateArtifacts

void ValidateOwnedGateArtifacts(IReadOnlyList<string> artifactNames) Source

Validates that each named gate artifact is either absent or a regular file in the retained output directory.

Parameters

  • artifactNamesOwned gate artifact filenames to validate.
Method

WriteOwnedGateArtifactAsync

Task WriteOwnedGateArtifactAsync(string artifactName, string contents, CancellationToken cancellationToken) Source

Writes one owned gate artifact through the retained output directory.

Parameters

  • artifactNameOwned gate artifact filename.
  • contentsComplete UTF-8 artifact content.
  • cancellationTokenCancellation token for the artifact content write.

Returns

A task that completes after the complete artifact content is committed.

Remarks

The content is staged privately before promotion so cancellation or a write failure leaves a pre-existing report intact.

Method

DeleteOwnedGateArtifact

void DeleteOwnedGateArtifact(string artifactName) Source

Removes one owned gate artifact through the retained output directory when it exists.

Parameters

  • artifactNameOwned gate artifact filename.
Method

NormalizePlatformPath

string NormalizePlatformPath(string path) Source

Canonicalizes fixed operating-system aliases before safety comparisons and no-follow traversal.

Parameters

  • pathAn absolute platform path.

Returns

The path with only fixed operating-system aliases canonicalized.

Type

EvidenceCommand

Source

Provides the discoverable root for AppSurface EvidenceHost commands.

Type

EvidenceInitCommand

Source

Creates a marked, non-overwriting EvidenceHost starter for an existing repository.

Property

RootPath

string RootPath { get; set; } Source

Gets or sets the destination directory for generated starter files.

Property

Force

bool Force { get; set; } Source

Gets or sets a value indicating whether an existing marked starter may be replaced.

Property

Sample

bool Sample { get; set; } Source

Gets or sets a value indicating whether to generate the supported v1 sample.

Type

EvidenceDoctorCommand

Source

Checks selected EvidenceHost prerequisites without provisioning resources or executing tests.

Type

EvidenceExplainCommand

Source

Resolves a policy and explicit diff into a plan without starting resources or executing producers.

Property

OutputDirectory

string OutputDirectory { get; set; } Source

Gets or sets the output directory for plan and summary artifacts.

Type

EvidenceRunCommand

Source

Executes the selected built-in evidence producer and emits a truthful manifest.

Property

OutputDirectory

string OutputDirectory { get; set; } Source

Gets or sets the output directory for plan, manifest, and producer artifacts.

Property

SolutionPath

string? SolutionPath { get; set; } Source

Gets or sets the solution supplied to the in-process coverage producer.

Property

ObservationOnly

bool ObservationOnly { get; set; } Source

Gets or sets a value indicating whether the run is informative only and cannot satisfy a gate.

Type

EvidenceVerifyCommand

Source

Verifies that an immutable evidence manifest binds to its resolved plan without rerunning producers.

Property

ManifestPath

string ManifestPath { get; set; } Source

Gets or sets the manifest path to verify.

Property

PlanPath

string? PlanPath { get; set; } Source

Gets or sets the resolved plan path. Defaults next to the manifest.

Type

EvidencePlanningCommandBase

Source

Provides shared policy and diff options for non-mutating and execution EvidenceHost commands.

Method

CreatePlanningRequest

EvidencePlanningRequest CreatePlanningRequest() Source

Creates the explicit policy-and-diff input consumed by a planning operation.

Property

Workflow

EvidenceCliWorkflow Workflow { get; } Source

Gets the policy-planning workflow shared by derived EvidenceHost commands.

Property

PolicyPath

string PolicyPath { get; set; } Source

Gets or sets the checked-in evidence policy path.

Property

Paths

string[] Paths { get; set; } Source

Gets or sets explicit changed repository-relative paths. Repeat for multiple paths.

Property

DiffFile

string? DiffFile { get; set; } Source

Gets or sets an optional unified diff used to derive changed paths.

Type

ISecretPromotionGoogleClientFactory

Source

Creates provider clients for declared Google transfer endpoints.

Remarks

The factory is a command-only seam. It keeps transfer credentials distinct from the read-only runtime configuration client and lets tests bind each named endpoint to a deterministic fake without reading environment credentials.

Type

ISecretPromotionReceiptWriter

Source

Persists value-free receipt snapshots for crash-safe transfer recovery.

Method

Write

void Write(string path, SecretPromotionReceipt receipt) Source

Atomically replaces the receipt at path.

Parameters

  • pathDestination receipt path.
  • receiptValue-free journal snapshot.
Type

AtomicSecretPromotionReceiptWriter

Source

Writes receipt snapshots through same-directory atomic replacement.

Type

DefaultSecretPromotionGoogleClientFactory

Source
Method

ValidateCredentialFile

string ValidateCredentialFile(string? value, bool? isWindows = null) Source

Validates a credential file path without returning its contents or path in diagnostics.

Parameters

  • valueAbsolute credential-file path.
  • isWindowsOptional platform seam used to verify fail-closed Windows behavior.

Returns

The canonical absolute path after posture validation.

Type

SecretPromotionWorkflow

Source

Runs declared, value-safe transfer jobs.

Method

ProbeLocalDestination

SecretPromotionRowResult ProbeLocalDestination(SecretPromotionPlanRow row, bool replace) Source

Maps a captured local precondition to a value-safe planning result.

Parameters

  • rowPlan row carrying the captured local precondition.
  • replaceWhether the plan explicitly authorizes a guarded replacement.

Returns

The value-safe planning result for the captured local state.

Method

MapLocalWriteResult

SecretPromotionRowResult MapLocalWriteResult(SecretPromotionPlanRow row, LocalCoordinatorWriteResult result) Source

Maps a guarded local coordinator write outcome to a value-safe transfer row.

Parameters

  • rowPlanned local destination row.
  • resultCoordinator write or recovery result to render.

Returns

The value-safe transfer row corresponding to the coordinator result.

Method

IsProductionJob

bool IsProductionJob(ResolvedEndpoints endpoints) Source

Returns whether either declared endpoint carries the production environment label.

Method

SecretParentForVersionResource

string? SecretParentForVersionResource(string? value) Source

Returns the canonical Google secret parent for a syntactically valid version resource.

Remarks

Invalid resources return null so their existing shape diagnostic remains authoritative.

Method

ComputePlanIdentity

string ComputePlanIdentity(SecretPromotionPlanArtifact plan) Source

Computes the value-free identity that binds every field of a transfer plan.

Parameters

  • planPlan artifact whose identity fields should be hashed.

Returns

Lowercase SHA-256 identity for the supplied artifact.

Type

SecretPromotionPlanRequest

Source

Describes a value-free request to create a transfer plan.

Parameters

  • ConfigPathPath to the reviewed endpoint and job configuration.
  • JobNameExact declared job name to plan.
  • OutputPlanPathDestination for the value-free plan artifact.
  • ReplaceWhether a Google destination may receive another version or an attested local destination may be replaced.
  • ExpiryPositive lifetime after which apply must reject the plan.
  • ContextLocalSecrets identity and metadata-only store context.
Type

SecretPromotionApplyRequest

Source

Describes a dry-run or mutation-gated transfer apply request.

Parameters

  • ConfigPathPath to the same reviewed configuration used for planning.
  • PlanPathPath to the unexpired value-free plan.
  • ApplyWhether destination mutations are permitted; false performs apply preflight only.
  • ConfirmationExact job name required for production-labelled transfers and every guarded local replacement.
  • ReceiptPathOptional value-free receipt path; defaults beside the plan.
  • ResumeReceiptPathOptional prior receipt whose confirmed writes may be skipped.
  • ContextLocalSecrets identity and store context used only after preflight permits payload access.
Type

SecretPromotionPlanResult

Source

Wraps the display-safe result returned after plan creation.

Parameters

  • SummaryValue-free row summary and plan location.
Type

SecretPromotionConfiguration

Source

Defines the versioned endpoint and named-job configuration authorization boundary.

Parameters

  • VersionConfiguration schema version: v1 writes an existing Google destination; v2 materializes pinned Google versions into LocalSecrets.
  • EndpointsExplicit remote endpoint profiles; LocalSecrets is the built-in local endpoint.
  • JobsReviewed jobs that bind exact sources, version-specific destinations, and rows.
Type

SecretPromotionEndpoint

Source

Declares one named provider endpoint without embedding credential values.

Parameters

  • NameCase-sensitive endpoint name referenced by jobs.
  • ProviderProvider identifier: google or the built-in local endpoint where the selected schema direction permits it.
  • EnvironmentEnvironment label used to enforce production rules.
  • CredentialExplicit Google credential mode; null is valid only for the built-in local endpoint.
Type

SecretPromotionCredential

Source

Chooses a Google credential acquisition mode without carrying raw credentials.

Parameters

  • ModeapplicationDefault or credentialFile.
  • PathAbsolute restricted credential-file path when that mode is selected; never emitted.
Type

SecretPromotionJob

Source

Declares one reviewed, direction-specific transfer job.

Parameters

  • NameCase-sensitive job identity used by plan, confirmation, and receipt checks.
  • SourceBuilt-in local or a declared Google endpoint name.
  • DestinationDeclared Google endpoint in v1, or the built-in local endpoint in v2.
  • AllowMutableLocalSourceExplicit production exception for a mutable LocalSecrets source.
  • RowsOrdered explicit key and resource mappings.
Type

SecretPromotionJobRow

Source

Maps one logical LocalSecrets key to explicit provider resources.

Parameters

  • KeyRequired logical AppSurface configuration key and row identity.
  • SourceExplicit Google version resource, or null for a LocalSecrets source.
  • DestinationExplicit existing Google secret parent resource in v1; omitted for a v2 LocalSecrets destination.
Type

SecretPromotionPlanArtifact

Source

Persists an expiring, value-free plan bound to all safety-relevant fields.

Parameters

  • VersionPlan schema version.
  • JobNameDeclared job identity.
  • ConfigDigestDigest of the exact endpoint configuration bytes.
  • CreatedAtUtcUTC creation timestamp included in plan identity.
  • ExpiresAtUtcUTC expiration enforced before payload access.
  • ReplaceWhether another enabled Google version or an attested LocalSecrets value is authorized to be replaced.
  • ProductionValue-free production label captured for review.
  • ReadyWhether all plan-time probes were ready or intentionally skipped.
  • PlanIdentityStable SHA-256 identity over every plan safety field and row precondition.
  • RowsOrdered canonical mappings and destination preconditions; never payloads.
Type

SecretPromotionPlanRow

Source

Captures one canonical, value-free plan row and its destination precondition.

Parameters

  • RowNumberOne-based declared processing order.
  • KeyExplicit logical LocalSecrets key.
  • SourceEndpointDeclared source endpoint name.
  • SourceResourceCanonical Google version resource, or local.
  • DestinationEndpointDeclared Google destination endpoint or built-in local endpoint.
  • DestinationResourceCanonical existing Google secret parent; null for a v2 LocalSecrets destination.
  • LocalStorageNameNormalized LocalSecrets identity used to detect duplicate logical mappings.
  • DestinationHasEnabledVersionsGoogle enabled-version precondition captured during planning.
  • DestinationExistsLocal destination existence precondition in v2; null for v1 Google destinations.
Method

Result

SecretPromotionRowResult Result(string status, string action, string? diagnosticCode, string? problem, bool? retryable, string? writtenResource = null) Source

Creates a value-free row result while preserving canonical row identity.

Parameters

  • statusStable workflow status.
  • actionDisplay-safe operation classification.
  • diagnosticCodeOptional stable diagnostic code.
  • problemOptional paste-safe problem statement.
  • retryableWhether an operator may retry without reconciliation.
  • writtenResourceConfirmed written Google version resource, when available; null for a local write.

Returns

A result that never includes secret payloads.

Method

GoogleSourceFailure

SecretPromotionRowResult GoogleSourceFailure(string action, GoogleSecretManagerTransferStatus status, AppSurfaceGoogleSecretTransferDiagnostic? diagnostic) Source

Maps a Google source failure without misclassifying destination absence.

Parameters

  • actionSource probe or access action.
  • statusProvider status to classify.
  • diagnosticOptional value-safe provider diagnostic.

Returns

A value-free source result.

Method

GoogleDestinationFailure

SecretPromotionRowResult GoogleDestinationFailure(string action, GoogleSecretManagerTransferStatus status, AppSurfaceGoogleSecretTransferDiagnostic? diagnostic) Source

Maps a Google destination failure, preserving indeterminate write state.

Parameters

  • actionDestination probe or write action.
  • statusProvider status to classify.
  • diagnosticOptional value-safe provider diagnostic.

Returns

A value-free destination result.

Property

DestinationKind

string? DestinationKind { get; init; } Source

Gets the destination contract for a v2 row; null preserves the v1 Google-only artifact shape.

Property

LocalAttestationOperationId

string? LocalAttestationOperationId { get; init; } Source

Gets the committed local attestation captured as a guarded replacement precondition for a v2 row.

Property

LocalPreconditionKind

string? LocalPreconditionKind { get; init; } Source

Gets the value-free local precondition classification captured for a v2 plan row.

Property

LocalPreconditionDiagnosticCode

string? LocalPreconditionDiagnosticCode { get; init; } Source

Gets the value-safe diagnostic code captured when local preflight could not establish a valid precondition.

Property

LocalPreconditionProblem

string? LocalPreconditionProblem { get; init; } Source

Gets the value-safe precondition problem captured for a failed v2 plan row.

Property

LocalPreconditionRetryable

bool? LocalPreconditionRetryable { get; init; } Source

Gets whether the local precondition failure is safe to retry without reconciliation.

Type

SecretPromotionRowResult

Source

Reports one value-free row outcome.

Parameters

  • RowNumberOne-based declared processing order.
  • KeyLogical AppSurface key; never its value.
  • SourceEndpointDeclared source endpoint name.
  • SourceResourceCanonical source identity.
  • DestinationEndpointDeclared Google destination endpoint or built-in local endpoint.
  • DestinationResourcePlanned Google secret parent or confirmed written version resource; null for local writes.
  • StatusStable result classification.
  • ActionDisplay-safe action classification.
  • DiagnosticCodeOptional stable diagnostic code.
  • ProblemOptional paste-safe problem statement.
  • RetryableWhether retry is safe without reconciliation.
Property

DestinationKind

string? DestinationKind { get; init; } Source

Gets the v2 destination kind when the result belongs to a local transfer row.

Type

SecretPromotionSummary

Source

Aggregates ordered value-free plan or apply results.

Parameters

  • Operationplan or apply.
  • JobDeclared job name.
  • ApplyWhether payload reads and destination writes were permitted.
  • SucceededWhether every row completed or was intentionally skipped.
  • RowsOrdered value-free row outcomes.
  • PlanPathWritten plan path for plan output.
  • ReceiptPathWritten receipt path when surfaced by a caller.
Type

SecretPromotionReceipt

Source

Provides the durable, value-free apply journal and resume evidence.

Parameters

  • PlanJobExact job name from the plan.
  • ConfigDigestExact configuration digest from the plan.
  • PlanIdentityIdentity binding every safety field and destination precondition.
  • RowsAtomically persisted ordered outcomes; indeterminate rows block automatic resume.
Type

DurableCommand

Source

Provides the discoverable root for AppSurface durable deployment commands.

Remarks

This command family deliberately owns schema lifecycle only. It does not expose Work, Flow, Schedule, recovery, or generic durable operator mutations because applications must authorize those controls themselves.

Type

DurableSchemaCommand

Source

Provides the discoverable root for explicit durable schema operations.

Type

DurableSchemaStatusCommand

Source

Prints installed and required durable schema versions without mutation.

Type

DurableSchemaScriptCommand

Source

Generates deterministic SQL for pending numbered migrations without opening a database connection.

Property

FromVersion

int FromVersion { get; set; } Source

Gets or sets the last migration already installed.

Property

OutputPath

string? OutputPath { get; set; } Source

Gets or sets an optional output path. The script is written to standard output when omitted.

Property

Force

bool Force { get; set; } Source

Gets or sets whether an existing output file may be atomically replaced.

Type

DurableSchemaApplyCommand

Source

Applies pending migrations through an explicitly configured migration-owner connection.

Property

Apply

bool Apply { get; set; } Source

Gets or sets the required mutation confirmation.

Type

DurableSchemaPreflightCommand

Source

Fails noninteractively unless the installed schema supports this runtime's readers and writers.

Type

DurableSchemaCommandBase

Source

Shared connection-source option and safety behavior for durable schema commands.

Property

Service

IDurableSchemaCommandService Service { get; } Source

Gets the injected schema command service.

Type

DurableSchemaOnlineCommandBase

Source

Supplies the secret-safe connection source and bounded execution shared only by online schema commands.

Method

ResolveConnectionString

string ResolveConnectionString() Source

Resolves a connection string without printing or persisting it.

Method

RunOnlineAsync

ValueTask<T> RunOnlineAsync<T>(string connectionString, CancellationToken cancellationToken, Func<string, CancellationToken, ValueTask<T>> operation) Source

Runs an online command with a bounded linked cancellation token and safe provider failure mapping.

Method

WriteStatusAsync

ValueTask WriteStatusAsync(IConsole console, DurableSchemaStatusView status) Source

Writes a stable schema status without exposing connection or server details.

Property

ConnectionEnvironmentVariable

string ConnectionEnvironmentVariable { get; set; } Source

Gets or sets the environment variable that contains the PostgreSQL connection string.

Remarks

Connection strings are intentionally not accepted as command-line values because process listings and shell history are not appropriate secret stores. The variable's value is neither logged nor rendered by this command.

Type

IDurableSchemaCommandService

Source

Testable CLI boundary over the PostgreSQL schema manager.

Method

GetStatusAsync

ValueTask<DurableSchemaStatusView> GetStatusAsync(string connectionString, CancellationToken cancellationToken) Source

Reads compatibility without mutation.

Method

GenerateScript

string GenerateScript(int fromVersion) Source

Generates deterministic migration SQL without opening a connection.

Method

ApplyAsync

ValueTask<DurableSchemaApplyView> ApplyAsync(string connectionString, CancellationToken cancellationToken) Source

Applies pending migrations with the supplied bounded token.

Type

DurableSchemaCommandService

Source

Production CLI adapter that creates and disposes a short-lived Npgsql data source per online command.

Type

DurableSchemaStatusView

Source

CLI-safe schema compatibility projection.

Parameters

  • CompatibilityThe package-defined compatibility state that determines whether durable reads and writes may begin.
  • InstalledVersionThe non-negative durable schema version currently installed in the target database.
  • RequiredVersionThe non-negative durable schema version required by this package version.
  • PendingVersionsThe ordered, non-null migration versions that remain to be applied; empty when no migration is pending.
Method

From

DurableSchemaStatusView From(DurableRuntimeSchemaStatus status) Source

Projects only safe schema status fields for the CLI.

Property

IsCompatible

bool IsCompatible { get; } Source

Gets whether schema reads and writes may begin.

Type

DurableSchemaApplyView

Source

CLI-safe schema apply projection.

Parameters

  • FromVersionThe non-negative schema version observed before the explicit apply operation began.
  • ToVersionThe non-negative schema version observed after the apply operation completed.
  • AppliedVersionsThe ordered, non-null migration versions applied by this invocation; empty when the schema was already current.
Type

DurableSchemaDiagnostics

Source

Renders stable, secret-safe schema diagnostics.

Method

PreflightFailure

string PreflightFailure(DurableRuntimeSchemaCompatibility compatibility) Source

Builds the single-block incompatibility diagnostic used by preflight.

Method

SchemaIncompatible

string SchemaIncompatible(DurableRuntimeSchemaCompatibility compatibility) Source

Builds a stable failure for schema-manager incompatibility.

Method

Cause

string Cause(DurableRuntimeSchemaCompatibility compatibility) Source

Returns a package-defined safe explanation without forwarding server exception text.

Type

DurableSchemaScriptOutput

Source

Writes generated scripts with atomic publication and explicit overwrite protection.

Method

WriteAsync

Task<string> WriteAsync(string requestedPath, string script, bool force, CancellationToken cancellationToken) Source

Writes script beside the requested destination then atomically publishes it.

Method

UseTemporaryFileWrittenHookForTesting

IDisposable UseTemporaryFileWrittenHookForTesting(Action callback) Source

Runs a callback after temporary SQL output is written and before publication.

Remarks

This test-only seam is async-flow-local so concurrent output tests can deterministically exercise the final publish window without affecting production writes or other tests.

Type

BoundedHttpBodyReader

Source

Reads an HTTP response body without retaining more than a caller-provided byte limit.

Remarks

Callers must inspect BoundedHttpBody.Truncated before parsing the retained bytes. A truncated body is useful for bounded diagnostics, but it is not a complete protocol message and must not be treated as one.

Method

ReadAsync

Task<BoundedHttpBody> ReadAsync(HttpContent content, int maxBodyBytes, CancellationToken cancellationToken) Source

Reads one content stream up to the configured byte limit.

Parameters

  • contentThe response content to read.
  • maxBodyBytesThe maximum number of bytes retained.
  • cancellationTokenCancels the bounded read.

Returns

The retained bytes and whether additional bytes were discarded.

Type

BoundedHttpBody

Source

Captures the bounded result of one HTTP response-body read.

Parameters

  • BytesThe retained bytes, capped at the requested maximum.
  • TruncatedWhether bytes beyond the requested maximum were discarded.
Type

LocalSecretsTransferCoordinator

Source

Coordinates AppSurface-owned remote-to-local transfers without persisting secret values.

Remarks

The coordinator is deliberately internal to the CLI. Local secret stores do not expose cross-store transactions, so this type serializes only cooperating AppSurface commands and records a value-free prepared/committed attestation. Direct platform-store edits remain outside that guarantee.

Method

Supports

bool Supports(IAppSurfaceLocalSecretStore store) Source

Gets whether the CLI can coordinate the supplied built-in store in v2.

Method

CapturePrecondition

LocalCoordinatorPrecondition CapturePrecondition(AppSurfaceLocalSecretIdentity identity, IAppSurfaceLocalSecretStore store, bool replace) Source

Captures the value-free local destination precondition for a v2 plan row.

Method

Recheck

LocalCoordinatorCheck Recheck(SecretPromotionPlanArtifact plan, SecretPromotionPlanRow row, AppSurfaceLocalSecretIdentity identity, IAppSurfaceLocalSecretStore store, bool allowPreparedRecovery) Source

Rechecks a plan-bound local precondition before source payload access.

Method

WriteOrRecover

LocalCoordinatorWriteResult WriteOrRecover(SecretPromotionPlanArtifact plan, SecretPromotionPlanRow row, AppSurfaceLocalSecretIdentity identity, IAppSurfaceLocalSecretStore store, string value, bool allowPreparedRecovery) Source

Writes a local value after rechecking its plan-bound precondition under the coordinator lock.

Method

VerifyCommitted

LocalCoordinatorCheck VerifyCommitted(SecretPromotionPlanArtifact plan, SecretPromotionPlanRow row, AppSurfaceLocalSecretIdentity identity, IAppSurfaceLocalSecretStore store) Source

Confirms that a receipt's local row still has matching coordinator evidence.

Method

InvalidateBeforeMutation

AppSurfaceLocalSecretResult InvalidateBeforeMutation(IAppSurfaceLocalSecretStore store, AppSurfaceLocalSecretIdentity identity, Func<AppSurfaceLocalSecretResult> mutation) Source

Invalidates any committed transfer attestation before a normal local CLI mutation.

Method

GetDefaultStateRoot

string GetDefaultStateRoot(string? localApplicationData, string userProfile) Source

Builds the default per-user transfer state directory from platform folder values.

Parameters

  • localApplicationDataPlatform local-application-data root, if available.
  • userProfilePlatform user-profile root used when local application data is unavailable.

Returns

The absolute AppSurface secret-transfer state directory.

Type

LocalTransferFormat

Source

Validates fixed-length lowercase hexadecimal transfer identities.

Method

IsLowerHex

bool IsLowerHex(string? value, int length) Source

Gets whether a value is lowercase hexadecimal with the required length.

Parameters

  • valueCandidate value to validate.
  • lengthRequired character length.

Returns

true when the value has the required lowercase hexadecimal shape.

Type

LocalSecretsTransferCoordinatorTestHooks

Source

Provides deterministic coordinator failure injection for internal tests.

Property

BeforeEnsureStateRoot

Action<string>? BeforeEnsureStateRoot { get; init; } Source

Runs immediately before the coordinator verifies or creates its state directory.

Property

BeforeAcquireLock

Action<string>? BeforeAcquireLock { get; init; } Source

Runs immediately before the coordinator opens a per-secret transfer lock.

Property

BeforeSecureLockFile

Action<string>? BeforeSecureLockFile { get; init; } Source

Runs after the coordinator opens a lock file and before it restricts the file to the current user.

Property

BeforeReadJournal

Action<string>? BeforeReadJournal { get; init; } Source

Runs immediately before the coordinator reads an existing transfer journal.

Property

AfterWriteTemporaryJournal

Action<string>? AfterWriteTemporaryJournal { get; init; } Source

Runs after a temporary journal has been written and before it is secured and committed.

Property

BeforeSecureTemporaryJournal

Action<string>? BeforeSecureTemporaryJournal { get; init; } Source

Runs immediately before the coordinator restricts a temporary journal to the current user.

Property

BeforeDeleteTemporaryJournal

Action<string>? BeforeDeleteTemporaryJournal { get; init; } Source

Runs immediately before cleanup deletes an uncommitted temporary journal.

Property

BeforeDeleteJournal

Action<string>? BeforeDeleteJournal { get; init; } Source

Runs immediately before an attestation journal is removed for an ordinary mutation.

Property

StoreDoctor

Func<IAppSurfaceLocalSecretStore, AppSurfaceLocalSecretIdentity, AppSurfaceLocalSecretResult>? StoreDoctor { get; init; } Source

Supplies the LocalSecrets doctor result instead of calling the store.

Property

StoreProbe

Func<IAppSurfaceLocalSecretStore, AppSurfaceLocalSecretIdentity, AppSurfaceLocalSecretResult>? StoreProbe { get; init; } Source

Supplies the LocalSecrets metadata probe result instead of calling the store.

Property

StoreGet

Func<IAppSurfaceLocalSecretStore, AppSurfaceLocalSecretIdentity, AppSurfaceLocalSecretResult>? StoreGet { get; init; } Source

Supplies the LocalSecrets recovery read result instead of calling the store.

Property

StoreSet

Func<IAppSurfaceLocalSecretStore, AppSurfaceLocalSecretIdentity, string, AppSurfaceLocalSecretResult>? StoreSet { get; init; } Source

Supplies the LocalSecrets write result instead of calling the store.

Type

LocalCoordinatorPrecondition

Source

Describes the captured local precondition without exposing local values.

Method

Missing

LocalCoordinatorPrecondition Missing() Source

Creates a precondition for a local target that is absent.

Returns

A missing-target precondition with no attestation or failure.

Method

Replace

LocalCoordinatorPrecondition Replace(string previousOperationId) Source

Creates a precondition that permits a guarded replacement.

Parameters

  • previousOperationIdCommitted attestation operation identifier that authorizes replacement.

Returns

A replacement precondition bound to the supplied prior operation.

Method

Conflict

LocalCoordinatorPrecondition Conflict(LocalCoordinatorFailure failure) Source

Creates a precondition that blocks transfer because the local target conflicts with the plan.

Parameters

  • failureValue-safe explanation of the conflict.

Returns

A conflict precondition carrying the supplied failure.

Method

Unsupported

LocalCoordinatorPrecondition Unsupported() Source

Creates a precondition for a local store that cannot participate in coordinated transfer.

Returns

An unsupported-store precondition with its stable failure diagnostic.

Method

Failed

LocalCoordinatorPrecondition Failed(LocalCoordinatorFailure failure) Source

Creates a precondition that failed before a safe local state could be established.

Parameters

  • failureValue-safe failure that prevented precondition capture.

Returns

A failed precondition carrying the supplied failure.

Type

LocalCoordinatorCheck

Source

Describes a local destination check without exposing local values.

Method

Ready

LocalCoordinatorCheck Ready() Source

Creates a check result that permits the planned operation.

Returns

A ready result without a failure.

Method

PreparedRecovery

LocalCoordinatorCheck PreparedRecovery() Source

Creates a check result that requires safe reconciliation of a prepared transfer.

Returns

A prepared-recovery result without a failure.

Method

Conflict

LocalCoordinatorCheck Conflict() Source

Creates a check result that blocks the operation because current state conflicts with the plan.

Returns

A conflict result without a failure because the plan mismatch is the diagnostic.

Method

Indeterminate

LocalCoordinatorCheck Indeterminate() Source

Creates a check result whose prior write state cannot be safely determined.

Returns

An indeterminate result without a failure because reconciliation is required.

Method

Unsupported

LocalCoordinatorCheck Unsupported() Source

Creates a check result for a local store that cannot participate in coordinated transfer.

Returns

An unsupported-store result with its stable failure diagnostic.

Method

Failed

LocalCoordinatorCheck Failed(LocalCoordinatorFailure failure) Source

Creates a check result that failed before the local state could be safely rechecked.

Parameters

  • failureValue-safe failure that prevented the recheck.

Returns

A failed result carrying the supplied failure.

Type

LocalCoordinatorWriteResult

Source

Describes a guarded local write or recovery outcome.

Method

Created

LocalCoordinatorWriteResult Created() Source

Creates a successful create outcome.

Returns

A created result without a failure.

Method

Replaced

LocalCoordinatorWriteResult Replaced() Source

Creates a successful guarded replacement outcome.

Returns

A replaced result without a failure.

Method

Recovered

LocalCoordinatorWriteResult Recovered() Source

Creates a successful recovery outcome for a matching prepared write.

Returns

A recovered result without a failure.

Method

Conflict

LocalCoordinatorWriteResult Conflict() Source

Creates a write outcome blocked by a changed local target or attestation.

Returns

A conflict result without a failure because the plan mismatch is the diagnostic.

Method

Indeterminate

LocalCoordinatorWriteResult Indeterminate(LocalCoordinatorFailure? failure = null) Source

Creates an outcome whose write state requires reconciliation before another write.

Parameters

  • failureOptional value-safe detail; omitted when the coordinator cannot determine a more specific cause.

Returns

An indeterminate result; a null failure means callers must use the generic reconciliation diagnostic.

Method

Unsupported

LocalCoordinatorWriteResult Unsupported() Source

Creates a write outcome for a local store that cannot participate in coordinated transfer.

Returns

An unsupported-store result with its stable failure diagnostic.

Method

Failed

LocalCoordinatorWriteResult Failed(LocalCoordinatorFailure failure) Source

Creates a write outcome that failed before a safe completion could be established.

Parameters

  • failureValue-safe failure that prevented a confirmed write result.

Returns

A failed result carrying the supplied failure.

Type

LocalCoordinatorFailure

Source

Contains a stable, value-safe local coordinator failure.

Type

LocalTransferJournal

Source

Persists only transfer identity and state, never a secret value or a value-derived hash.

Enum

LocalCoordinatorPreconditionKind

Source

Classifies the value-free precondition captured for a local transfer target.

Enum

LocalCoordinatorCheckKind

Source

Classifies a value-free recheck of a plan-bound local destination.

Enum

LocalCoordinatorWriteKind

Source

Classifies a guarded local write or recovery outcome.

Enum

LocalTransferJournalState

Source

Tracks the value-free lifecycle of a local transfer journal.

Type

CoverageGithubSummaryWriter

Source

Appends the bounded coverage-gate Markdown artifact to a GitHub Actions step summary.

Remarks

This is command presentation, not coverage evaluation. The coverage core writes the owned Markdown artifact; this CLI adapter reads that artifact only when the public --github-summary behavior is enabled.

Method

AppendAsync

Task AppendAsync(string? githubStepSummaryPath, string markdownReportPath, CancellationToken cancellationToken) Source

Appends the supplied Markdown artifact when GitHub provided a summary path.

Type

CoverageCommand

Source

Provides the discoverable root for AppSurface coverage commands.

Remarks

The root command keeps the coverage workflow visible in appsurface --help. The stable v1 contract includes coverage run, which executes instrumented .NET test projects, coverage merge, which fans in existing Cobertura shards, and coverage gate, which evaluates the merged coverage without requiring a hosted coverage service. coverage clean removes known AppSurface-owned artifacts or, with explicit --all --apply, all local TestResults directories below a selected worktree root.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console) Source

Prints the coverage command family summary.

Parameters

  • consoleCliFx console used for command output.

Returns

A completed task.

Type

AppSurfaceExportCommand

Source

Exports an AppSurface/RazorWire application through the product-facing appsurface export command.

Remarks

This command delegates crawling, hybrid split-origin rewriting, validation, and materialization to the shared RazorWire export engine while keeping the common AppSurface workflow discoverable from the AppSurface CLI.

Property

PublishRootExtrasPath

string? PublishRootExtrasPath { get; set; } Source

Gets or sets an optional path to a publish-root deployment extras manifest.

Remarks

The manifest declares explicit deployment-owned files, such as CNAME, that should be copied into the publish root after export proves they do not collide with generated output. This option is distinct from SeedRoutesPath, which contains routes to crawl.

Property

LiveOrigin

string? LiveOrigin { get; set; } Source

Gets or sets the optional live origin for RazorWire-managed split-origin hybrid interactions.

Remarks

The value must be an absolute http or https origin with no path, query string, fragment, or userinfo. Use this when the exported static files are served from one origin but RazorWire-owned live streams, islands, and lazy anti-forgery forms must call a different live app origin. Leave it unset for same-origin hybrid deployments.

Property

HybridCredentials

RazorWireHybridCredentialsMode HybridCredentials { get; set; } Source

Gets or sets credential behavior for RazorWire-managed live calls in hybrid output.

Remarks

Defaults to RazorWireHybridCredentialsMode.Auto, which includes credentials only when LiveOrigin is set. Use RazorWireHybridCredentialsMode.Include for cookie-backed cross-origin live apps and RazorWireHybridCredentialsMode.Omit for public live surfaces that do not depend on cookies or anti-forgery token refreshes.

Type

CoverageRunDurationParser

Source

Parses the intentionally narrow duration grammar used by coverage watchdog options.

Method

Parse

TimeSpan Parse(string? value, string option, bool allowZero) Source

Parses a lowercase integer duration such as 500ms, 30s, 10m, or 1h.

Parameters

  • valueRaw option value.
  • optionOption name used in diagnostics.
  • allowZeroWhether the exact value 0 is accepted.

Returns

The parsed duration.

Type

CoverageRunConsoleSink

Source

Serializes coverage-run console messages so heartbeat and incident blocks do not interleave.

Method

WriteOutputAsync

Task WriteOutputAsync(string text, CancellationToken cancellationToken = default, bool appendNewLine = true, bool coalesceIfWritePending = false) Source

Writes one serialized block to standard output.

Parameters

  • textComplete output block.
  • cancellationTokenBounds how long the caller waits without cancelling an accepted write.
  • appendNewLineWhether to append the platform newline.
  • coalesceIfWritePendingWhether to omit this periodic update when an earlier write is still pending. Diagnostic and terminal blocks must leave this disabled.

Returns

A task that completes when the write finishes or the caller's bounded wait ends.

Method

WriteErrorAsync

Task WriteErrorAsync(string text, CancellationToken cancellationToken = default, bool appendNewLine = true) Source

Writes one serialized block to standard error.

Method

WriteCriticalErrorAsync

Task WriteCriticalErrorAsync(string text, CancellationToken cancellationToken = default, bool appendNewLine = true) Source

Writes a terminal diagnostic in FIFO order when possible, then bypasses a blocked queue after the bounded wait. The fallback can interleave with a hung earlier output block, but atomically abandons its queued continuation so the critical diagnostic is emitted at most once.

Parameters

  • textComplete error block.
  • cancellationTokenBounds how long the caller waits without cancelling an accepted write.
  • appendNewLineWhether to append the platform newline.

Returns

A task that completes after the ordered attempt or bounded direct fallback.

Type

CoverageRunOperation

Source

Tracks one active coverage-run operation and exposes bounded progress updates.

Method

ObserveBytes

void ObserveBytes(int count) Source

Records a positive count of observed child-process bytes as progress.

Method

Transition

void Transition(string state) Source

Records an explicit operation state transition as progress.

Method

ReserveProcess

CoverageRunProcessLease ReserveProcess() Source

Reserves a supervisor-owned process lease before invoking the process runner.

Type

CoverageRunProcessLease

Source

Tracks a callback-delivered root process and guarantees late attachments observe terminal closure. The default termination path targets the root process and its descendants; injected termination callbacks exist only to make watchdog cleanup verifiable in tests.

Method

Attach

void Attach(Process process) Source

Attaches the root process delivered by CliWrap's start callback.

Method

Complete

void Complete() Source

Marks the command complete and unregisters the lease.

Type

CoverageRunWatchdogSupervisor

Source

Supervises coverage-run orchestration using per-operation monotonic progress clocks.

Method

BindOutputDirectory

void BindOutputDirectory(string outputDirectory) Source

Binds watchdog artifacts to an AppSurface-owned output directory after full output validation.

Parameters

  • outputDirectoryAbsolute prepared output directory for canonical watchdog artifacts.

Remarks

Promotion failures are reported as ASCOV122 and do not replace the watchdog's terminal outcome.

Method

Start

CoverageRunOperation Start(string kind, string? project = null, int order = 0, string state = "running", string? log = null, IReadOnlyList<string>? commandOptions = null) Source

Starts a supervised operation. Queued work should call this only when it becomes active.

Parameters

  • kindStable operation kind used for ordering and diagnostics.
  • projectOptional solution-relative project path.
  • orderStable execution order among operations of the same kind.
  • stateInitial operation state.
  • logOptional output-relative log path.
  • commandOptionsSafe command option names; values must already be excluded.

Returns

A disposable operation that marks completion and exposes progress/process seams.

Exceptions

  • OperationCanceledExceptionThrown after the watchdog claims terminal ownership.
Method

ReserveProcess

CoverageRunProcessLease ReserveProcess() Source

Reserves a process lease before a child-process start callback can attach its root process.

Returns

A lease registered for terminal cleanup.

Exceptions

  • OperationCanceledExceptionThrown after the watchdog claims terminal ownership.
Method

ReleaseProcess

void ReleaseProcess(CoverageRunProcessLease lease) Source

Releases a completed process lease from terminal cleanup tracking.

Parameters

  • leaseThe completed lease.
Method

ObserveBytes

void ObserveBytes(long id, int count) Source

Records positive observed output bytes for an active operation.

Parameters

  • idOperation identifier.
  • countPositive byte count reported by the process observer.
Method

Transition

void Transition(long id, string state) Source

Records an explicit state transition as operation progress.

Parameters

  • idOperation identifier.
  • stateNew stable state.
Method

Complete

void Complete(long id) Source

Marks an active operation complete exactly once.

Parameters

  • idOperation identifier.
Method

ThrowIfFailed

void ThrowIfFailed() Source

Converts watchdog-owned cancellation into the stable ASCOV121 exit-124 diagnostic.

Exceptions

  • CommandExceptionThrown with exit code 124 after terminal cleanup and the bounded incident-write attempt finish.
Method

Commit

void Commit(Action commit) Source

Revalidates that the watchdog has not claimed terminal ownership before an atomic artifact commit.

Parameters

  • commitSynchronous canonical replacement performed while terminal ownership is locked.

Exceptions

  • ArgumentNullExceptionThrown when commit is null.
  • OperationCanceledExceptionThrown when the watchdog already owns the terminal outcome.
Property

CancellationToken

CancellationToken CancellationToken { get; } Source

Gets the token shared by all supervised coverage work.

Property

Console

CoverageRunConsoleSink Console { get; } Source

Gets the run-scoped bounded console sink used by all coverage workflow messages.

Enum

CoverageRunWatchdogMode

Source

Controls how coverage run responds when an active operation produces no observable progress.

Type

TestResultsCleanupRequest

Source

Describes one request to preview or remove TestResults directories through coverage clean --all.

Parameters

  • RootDirectoryOptional scan root; the current directory is used when omitted.
  • ApplyWhether discovered directories may be deleted.
Type

TestResultsCleanupResult

Source

Describes the completed TestResults cleanup operation.

Parameters

  • RootDirectoryCanonical absolute scan root.
  • DirectoriesCanonical absolute directories found below the root.
  • EstimatedBytesTotal regular-file bytes measured without following links.
  • ReparsePointsSkippedSymbolic links or reparse points not traversed or counted.
  • AppliedWhether the listed directories were deleted.
Type

TestResultsCleanupWorkflow

Source

Discovers, sizes, and explicitly removes private TestResults directories.

Remarks

The workflow deliberately has a narrow target definition: it only considers descendant directories whose final name is TestResults, compared without regard to case. It does not follow symbolic links or Windows reparse points during discovery, sizing, or deletion. This protects an ordinary worktree cleanup from crossing into a linked checkout or unrelated storage location.

Method

CleanAsync

Task<TestResultsCleanupResult> CleanAsync(TestResultsCleanupRequest request, IConsole console, CancellationToken cancellationToken) Source

Previews or deletes matching directories and writes a bounded operator summary.

Parameters

  • requestThe root and explicit deletion confirmation.
  • consoleConsole used for summary output.
  • cancellationTokenCancellation token observed during filesystem traversal.

Returns

A value describing the discovered directories and estimated byte count.

Exceptions

  • CommandExceptionThrown when the root is unsafe, cannot be inspected, or deletion fails.
Method

DeleteDirectoryTree

void DeleteDirectoryTree(string directory, CancellationToken cancellationToken) Source

Removes one validated TestResults directory without traversing linked entries.

Parameters

  • directoryDirectory or linked directory entry to remove.
  • cancellationTokenCancellation token observed between directory entries.

Remarks

This internal test seam covers the race-safe final link check: a directory that is replaced by a link after discovery is unlinked instead of traversing its target.

Method

SaturatingAdd

long SaturatingAdd(long current, long next) Source

Returns the non-negative sum without exceeding long.MaxValue.

Method

FormatBytes

string FormatBytes(long bytes) Source

Formats a non-negative regular-file byte count for cleanup output.

Method

Pluralize

string Pluralize(string singular, int count) Source

Formats a singular noun for one or more cleanup entries.

Type

AppSurfaceCliModule

Source

Represents the AppSurface CLI root module used to bootstrap command execution.

Remarks

The module is intentionally empty today: the CLI owns command registration in AppSurfaceCliApp and delegates web-host behavior to AppSurface Docs-specific runners. Add dependencies here only when every AppSurface CLI command needs the same module-level dependency graph or host lifecycle hook. Prefer command-local services or custom test registrations for isolated behavior, and do not place runtime command logic in this module.

Method

ConfigureServices

void ConfigureServices(StartupContext context, IServiceCollection services) Source

Configures shared CLI services after the default command runtime registrations have been added.

Parameters

  • contextStartup context for the CLI run.
  • servicesService collection that will back command construction.

Remarks

The default implementation is a no-op. Keep it empty unless a service truly applies to the whole CLI surface.

Method

ConfigureHostBeforeServices

void ConfigureHostBeforeServices(StartupContext context, IHostBuilder builder) Source

Configures a Generic Host builder before services are registered.

Parameters

  • contextStartup context for the CLI run.
  • builderHost builder that would be configured by host-based startup paths.

Remarks

The command runtime does not currently build a Generic Host through this module, so this hook is intentionally a no-op and exists to satisfy the shared AppSurface host-module contract.

Method

ConfigureHostAfterServices

void ConfigureHostAfterServices(StartupContext context, IHostBuilder builder) Source

Configures a Generic Host builder after services are registered.

Parameters

  • contextStartup context for the CLI run.
  • builderHost builder that would be configured by host-based startup paths.

Remarks

Keep this empty until the CLI adopts a host-backed lifecycle. Command behavior should stay in command classes.

Method

RegisterDependentModules

void RegisterDependentModules(ModuleDependencyBuilder builder) Source

Registers root-module dependencies for the AppSurface CLI module graph.

Parameters

  • builderDependency builder used by AppSurface startup composition.

Remarks

The CLI has no module dependencies by default. Add dependencies here only for cross-command infrastructure that must participate in AppSurface module ordering.

Type

ReleaseComposeCommand

Source

Composes independently authored release-note entries into a Markdown document.

Remarks

Entries live in a flat, filename-sorted directory, so feature branches do not contend for the same changelog or living-note lines. The command validates every entry and template marker, rebases relative Markdown links for the selected output, previews by default, and writes only when both --output and --apply are supplied. It composes a note; release-specific versioning, changelog rollover, entry consumption, and publication remain the responsibility of the caller's release workflow.

Method

ExecuteAsync

ValueTask ExecuteAsync(IConsole console, CancellationToken cancellationToken) Source

Executes composition with an explicit cancellation token.

Parameters

  • consoleConsole receiving the validation summary and composed Markdown.
  • cancellationTokenToken observed while reading entry files and writing output.

Returns

A task that completes after the preview or write result is reported.

Property

RootDirectory

string? RootDirectory { get; set; } Source

Gets or sets the project root that bounds the template, entries, and optional output paths.

Property

EntriesDirectory

string? EntriesDirectory { get; set; } Source

Gets or sets the flat directory containing append-only entry files.

Property

TemplatePath

string? TemplatePath { get; set; } Source

Gets or sets the Markdown template that declares the entry sections.

Property

OutputPath

string? OutputPath { get; set; } Source

Gets or sets the destination for a composed document.

Remarks

The destination must differ from the template so that the template keeps its composition markers for the next release cycle. Supplying this option without --apply previews the exact write without changing files.

Property

Apply

bool Apply { get; set; } Source

Gets or sets a value indicating whether the composed document may be written.