Expand description
Application API and ASP integration overview.
§Local commands
check evaluates source selected by CheckArgs. Its default selection compares
current worktree changes with HEAD; all evaluates the entire supported source view.
run_sense examines exact dependency changes selected by SenseArgs. Both commands
print their result and return an error for blocking findings or unavailable coverage.
run_workflow combines Verify, Sense, and required native providers with the resolved
repository settings for post-edit, pre-commit, or CI.
doctor, status, and rules provide read-only operational information.
§Provider API
ProviderProfile documents every bundled provider, including its prerequisites,
command, supported scope, and execution boundary. Use serve_stdio_profile to start
one provider identity, or run opcore serve --stdio --profile <profile>.
render_provider_manifest produces the matching manifest after installation; its
executable path and checksum bind the exact installed binary.
Every provider implements ASP Core check/1.0 over JSON-RPC 2.0, with one UTF-8 JSON
object per line. The lifecycle is initialize, initialized, check/evaluate,
shutdown, then exit. Cancellation uses $/cancelRequest. Evaluation cannot begin
until the host’s initialized grant permits it. Providers request exact immutable bytes
through host workspace/listTree and workspace/readBlob callbacks.
A check/evaluate assessment contains diagnostics, coverage, and evidence bound to the
baseline, change digest, blobs read, effective configuration, and provider build.
introduced compares public diagnostic fingerprints; all returns current findings.
Providers never decide whether a change may be applied. The calling host owns decisions,
policy authority, isolation, and receipts. Opcore’s private local runner is advisory
and does not issue an ASP adoption receipt.
The complete request/response schemas, examples, and protocol specification are included
in the repository and platform archive under asp/; they are the normative wire API.
Hosts resolve repository and workflow settings and send the provider’s effective
configuration with each request. The provider validates and binds those settings.
§Rust embedding
This module is the executable’s supported Rust boundary; internal parser and graph types are not a public library API. Asynchronous entrypoints require a Tokio runtime. For example, an outer host can select an identity without invoking a repository tool:
use opcore::api::{ProviderProfile, serve_stdio_profile};
serve_stdio_profile(ProviderProfile::Fast).await?;Structs§
- Check
Args - Select a local Git view, output format, and optional ASP providers.
- Configure
Hook Args - Installer arguments for one receipt-owned global post-tool hook.
- Repository
Args - Repository selection and structured output for read-only operational commands.
- RunArgs
- Run the built-in checks with repository and workflow settings.
- Sense
Args - Select the exact dependency comparison and how to handle findings and coverage.
Enums§
- Agent
- Agent whose global hook configuration is managed by the installer.
- Check
Comparison - Comparison selected for the private local ASP host.
- Check
Provider - Provider set selected for the private local ASP host.
- Provider
Profile - Reference for all four ASP provider identities in the Opcore executable.
- Workflow
- A built-in check workflow with repository-defined settings.
Functions§
- agent_
gate - Returns true when the hook process must exit with the conventional blocking code 2.
- check
- Evaluates the selected immutable local Git view and renders its assessment.
- configuration_
schema - Prints the strict repository configuration JSON Schema without reading a repository.
- configure
- Adds or removes the single installer-owned hook entry.
- doctor
- Prints read-only runtime diagnostics.
- render_
manifest - Renders a manifest bound to the exact installed executable bytes.
- render_
provider_ manifest - Renders one bundled provider manifest bound to the exact installed executable bytes.
- rules
- Prints the built-in rule and policy manifest.
- run_
sense - Evaluates the selected exact local dependency view and renders its report.
- run_
workflow - Executes a workflow and prints its combined result.
- run_
workflow_ with_ comparison - Executes a workflow with an explicit Verify/native comparison and prints its combined result.
- serve_
stdio - Runs the bounded ASP JSON-RPC lifecycle over standard input and output.
- serve_
stdio_ profile - Runs one selected bundled ASP provider over standard input and output.
- serve_
stdio_ profile_ at - Runs one selected provider with a private host-supplied project path.
- status
- Prints read-only repository and policy status.