Expand description
Provides the runtime module.
Β§Examples
β
use pharos_native::runtime;Β§Related
crate::configfor shared runtime configuration inputs.crate::platformfor platform-specific runtime support.
ModulesΒ§
- agent_
architect - Exposes Architect webapp-owned agent worker services.
- agent_
bridge - Exposes the
agent_bridgeruntime module. - agent_
ingest - Exposes Architect attachment and task-ingestion services. Root adapter for Architect attachment ingest and platform media extraction.
- agent_
media - Exposes optional Architect media extraction adapters and artifact readiness checks. Compatibility exports for Architect-owned media orchestration.
- agent_
vault - Exposes Architect provider-secret vault services.
- architect_
chatgpt_ πhttp - Thin installed-Architect adapters to existing session, CSRF, storage and OAuth services.
- architect_
http π - Architect HTTP request, preview, editor, and export handlers.
- architect_
import π - Bounded, link-free staging for Architect folder and archive imports.
- architect_
preview_ πaccounts - Credentials belong exclusively to Architectβs isolated preview database.
- architect_
project_ πidentity - Native lifecycle and portable preview-data handoff for Architect app-ID renames.
- backup
- Exposes shared app scaffold helpers used by the CLI and agent bridge.
Exposes the
backupruntime module. - business
- Exposes the
businessruntime module. - cache
- Exposes the
cacheruntime module. - cache_
key - Exposes the
cache_keyruntime module. - connection
- Exposes the
connectionruntime module. - database
- Exposes the
databaseruntime module. - declarative
- Exposes the
declarativeruntime module. - docs
- Exposes the
docsruntime module. - dynamic
- Exposes the
dynamicruntime module. - event_
discovery π - Evidence-backed event ingestion for apps declaring an event-discovery contract. Public sources are fetched only by the background worker, through the bounded transport.
- feature_
runtime - Exposes the
feature_runtimeruntime module. - features
- Exposes the
featuresruntime module. - fs
- Exposes the
fsruntime module. - generated
- Exposes the
generatedruntime module. - http
- Exposes the
httpruntime module. - job
- Exposes the
jobruntime module. - json_
commands - Exposes the
json_commandsruntime module. - json_
ops - Exposes the
json_opsruntime module. - listener
- Exposes the
listenerruntime module. - ops_
bridge - Exposes the
ops_bridgeruntime module. - outbound_
url π - Shared URL admission for public source configuration and evidence links.
- payment_
provider - Framework-owned, app-neutral payment-provider lifecycle contracts. App-neutral payment-provider contracts.
- reference
- Exposes the
referenceruntime module. - runtime_
reports - Exposes the
runtime_reportsruntime module. - runtime_
stack - Exposes the
runtime_stackruntime module. - social_
connections π - Framework-owned external-account controllers. These routes never issue a local login session.
- state_
store - Exposes the
state_storeruntime module. - support
- Exposes the
supportruntime module. - ui
- Exposes the
uiruntime module. - worker_
pool - Exposes the
worker_poolruntime module.
StructsΒ§
- Root
Runtime πAppLoad Service - Root
Runtime πRequest Service - Finds the mounted app that matches a request path.
- Runtime
Scaffold - Advertised runtime capability scaffold for the current host build.
EnumsΒ§
- Accepted
Connection π - Capability
State - Availability state for one runtime capability.
- Postgres
TlsMode - TLS policy enforced for PostgreSQL runtime connections.
- Runtime
Listener π
ConstantsΒ§
- MAX_
BUILD_ πBYTES - MAX_
BUILD_ πFILES - MODULE_
STATUS - Implementation status marker for the runtime module.
- PHAROS_
RUNTIME_ STACK_ VERSION - Version string embedded in the runtime stack contract.
- PHAROS_
TARGET_ ID - Stable target identifier for the native host runtime.
- PHAROS_
VERSION - Version string embedded in the native runtime binary.
- RUNTIME_
CAPABILITY_ STATUS - Advertised capability scaffold for the current native build.
StaticsΒ§
FunctionsΒ§
- active_
session_ πuser_ id - Performs active session user ID.
- actor_
has_ πroute_ policy - Resolves actor roles and verifies the route capability against the compiled policy contract.
- actor_
owns_ πmutation_ resource - Enforces actor ownership for app-declared payment-provider resources and legacy business/appointment resource paths.
- app_
artifact_ πbuild_ is_ current - app_
database_ πoperations - Resolves a declared appβs operation store without choosing a vendor.
- app_
declarative_ πroute_ response - Performs app declarative route response.
- app_
fragment_ πresponse - Performs app fragment response.
- app_
login_ πlocation - Returns the scoped login path for one mounted application.
- app_
login_ πredirect - Builds one login redirect that preserves an internal post-authentication path.
- app_
manifest_ πvalue - app_
mount_ πprefix - Performs app mount prefix.
- app_
post_ πlogin_ role_ landing_ path - app_
relative_ πtarget - Performs app relative target.
- app_
render_ πrequest - Builds app-neutral request data for render and route adapters.
- app_
response_ πbody_ budget - Gives authenticated source-archive responses their existing bounded source-export budget.
- app_
route_ πpage_ html - Performs app route page HTML.
- app_
route_ πpage_ html_ from_ detail - Renders an authorized bounded detail model without repeating its database read.
- app_
route_ πpage_ html_ result - Retains scoped database failures as HTTP outcomes and reads each detail once.
- app_
route_ πresponse - Builds the response for an app-owned route request.
- app_
route_ πresponse_ with_ cookie - Performs app route response with cookie.
- app_
route_ πresponse_ with_ cookie_ core - Performs app route response with cookie core.
- app_
route_ πresponse_ with_ cookie_ unlocked - Dispatches one app request after the authorization and state transaction boundary.
- app_
route_ πresponse_ with_ request - Performs app route response with request.
- app_
runtime_ πbackend_ summary_ value - Builds a backend summary for one loaded app runtime.
- app_
runtime_ conf_ required_ present - Checks whether required runtime config files are present for an app.
- app_
runtime_ host_ profile - Returns the effective host profile for an app runtime.
- app_
runtime_ probe_ ready - Runs a readiness probe against one loaded app runtime.
- app_
runtime_ πreport_ json - Performs app runtime report JSON.
- app_
safe_ πnext_ path - Returns one redirect-safe internal next path or the provided fallback.
- app_
scope_ πpath - Returns one application-scoped internal path below the mounted base path.
- app_
security_ πcache_ scope - Isolates session and role caches by the configured data authority as well as app identity. Changing a namespace cannot reuse another databaseβs admission.
- app_
select_ πoption - Performs app select option.
- app_
state_ πcache_ sibling_ path - app_
static_ πfragment - Performs app static fragment.
- app_
ui_ πbutton - Renders one canonical button control owned by the selected app bundle.
- app_
ui_ πfragment - Renders one app-owned UI fragment with an explicit parameter document.
- app_
ui_ πhidden_ input - Renders one canonical hidden input owned by the selected app bundle.
- app_
ui_ πinput - Renders one canonical input control owned by the selected app bundle.
- app_
ui_ πselect - Renders one canonical select control owned by the selected app bundle.
- app_
ui_ πtextarea - Renders one canonical textarea control owned by the selected app bundle.
- app_
uses_ πfile_ backed_ runtime_ state - app_
uses_ πrelational_ runtime_ authority - append_
optional_ πfile_ fingerprint - append_
output_ πmetadata - apply_
route_ πresponse_ middleware - Performs apply route response middleware.
- artifact_
file_ πcopy_ is_ current - authorize_
app_ πmutation - Applies the single pre-dispatch authorization boundary for every mutation.
- barcode_
reader_ main - Runs the native barcode-reader entrypoint.
- bootstrap_
font_ πhelper_ references - Detects the Bootstrap Icons font helper files referenced by an app.
- bootstrap_
icon_ πnames_ in_ text - Scans reference markers once, preserving class-prefix and SVG-suffix matching.
- bootstrap_
icon_ πreferences - Extracts icon names from Bootstrap class names and static SVG references.
- build_
app_ πconfig_ report_ local_ json - Builds app config report local JSON.
- build_
app_ πdoctor_ report_ json - Builds app doctor report JSON.
- build_
app_ from_ root - build_
docs_ πpages - Builds docs pages.
- build_
docs_ πrustdoc_ reference - Builds the bundled Rust API and source reference for a docs app.
- build_
runtime_ build_ report_ json - Builds the JSON report returned by runtime build flows.
- build_
runtime_ status_ report_ json - Builds the JSON status report for the loaded runtime stack.
- business_
catalog_ πaction_ response - Parses a catalog form and applies its existing rules through the generic operation store. URL ownership takes precedence over submitted identifiers.
- business_
catalog_ πfor_ page - Loads a scoped catalog for the existing declared business page templates.
- business_
identity_ πaction_ response - Applies a business identity form with route-owned actor and business scope.
- business_
payment_ πfor_ page - Adds redacted provider settings after scoped management authorization while retaining the catalogβs descriptive owner fields for existing templates.
- cached_
output_ πsha256 - cached_
source_ πoutput_ sha256 - cached_
verified_ πmigration_ state - canonical_
http_ πerror_ body - Normalizes every JSON failure into the stable public error envelope.
- checked_
app_ πdatabase_ operations - Opens the configured logical app authority while preserving error categories.
- chrono_
like_ πtimestamp - Formats epoch seconds through the shared runtime timestamp helper.
- cleanup_
incremental_ πartifact_ outputs - clear_
cloned_ app - Clears a cloned app runtime in place.
- clone_
optional_ string - Clones an optional string value into owned storage.
- collect_
runtime_ πfingerprint_ files - Collects runtime fingerprint files.
- collect_
text_ πfiles - Collects text files below an app source tree for icon reference discovery.
- collect_
tree_ πfiles - Collects all regular files below a root in deterministic relative-path order.
- copy_
bootstrap_ πicon_ helper - Copies one central Bootstrap Icons helper file into the app artifact.
- copy_
selected_ πbootstrap_ icons - Copies only the Bootstrap Icons used by an app into its built artifact.
- copy_
source_ πtree_ to_ artifact - Copies source tree to artifact.
- current_
timestamp_ πutc - Performs current timestamp utc.
- database_
error_ πresponse - Maps the shared database failure set to stable HTTP errors without driver details.
- database_
operation_ πhttp_ status - Maps shared operation errors without revealing database or credential details.
- db_
check_ πjson - Performs database check JSON.
- declared_
login_ πpath_ is_ safe - declared_
post_ πlogin_ role_ landing - decode_
qr_ image - Decodes a QR image into its textual payload.
- docs_
copy_ πrustdoc_ tree - Copies an existing Rustdoc tree into another directory.
- docs_
files_ πequal - docs_
manifest_ πbool_ path - Reads a nested boolean from the docs manifest object.
- docs_
manifest_ πoutput_ remap - Performs docs manifest output remap.
- docs_
manifest_ πpublish_ mode - Performs docs manifest publish mode.
- docs_
manifest_ πrelative_ path - Resolves an optional docs-owned relative artifact path from the manifest.
- docs_
manifest_ πrequired_ relative_ path - Resolves a required docs-owned relative artifact path from the manifest.
- docs_
manifest_ πstring - Performs docs manifest string.
- docs_
manifest_ πstring_ array - Performs docs manifest string array.
- docs_
manifest_ πstring_ path - Reads a nested string from the docs manifest object.
- docs_
manifest_ πvalue_ path - Looks up a nested value under the docs manifest object.
- docs_
nav_ πpublished_ outputs - Collects published docs outputs declared by navigation.
- docs_
output_ πrelative - Performs docs output relative.
- docs_
relative_ πasset - Performs docs relative asset.
- docs_
repo_ πroot - Resolves the trusted repository root for a docs app build.
- docs_
restore_ πcached_ rustdoc_ artifact - Restores a cached Rustdoc tree into the current docs app artifact when inputs are unchanged.
- docs_
route_ πpublished_ outputs - Collects published docs outputs declared by page routes.
- docs_
rustdoc_ πartifact_ cache_ dir - Resolves the cache directory for a Rustdoc artifact fingerprint.
- docs_
rustdoc_ πfingerprint_ matches - Checks whether a stored Rustdoc fingerprint file matches the current input digest.
- docs_
rustdoc_ πinput_ digest - Builds a fingerprint for the Rustdoc inputs that feed the docs app.
- docs_
rustdoc_ πoutput_ dir - Resolves the Rustdoc output directory declared by a docs app manifest.
- docs_
sync_ πrustdoc_ tree - docs_
valid_ πexisting_ rustdoc_ output_ dir - Returns the existing Rustdoc output directory when it matches the current Rust inputs.
- docs_
validate_ πrelative_ path - Validates one docs-owned relative artifact path.
- dynamic_
runtime_ handle_ request - Handles one dynamic runtime request end to end.
- emit_
runtime_ πlog_ banner - Emits runtime log banner.
- environment_
valid π - Performs environment valid.
- finalize_
artifact_ πmanifest - Performs finalize artifact manifest.
- framework_
builtin_ response - Builds the response for a framework-owned route.
- free_
app - Clears one app runtime in place.
- generated_
ownership_ πmanifest_ matches_ source_ digest - Builds an app from its source root into a runtime artifact.
- handle_
runtime_ app_ command_ direct - Handles one app-targeted runtime command directly.
- handle_
runtime_ command_ direct - Handles one top-level runtime command directly.
- handle_
runtime_ πconnection - Reads, dispatches, and closes one accepted connection inside a worker thread.
- http_
download_ πresponse - http_
html_ πresponse - Performs HTTP HTML response.
- http_
html_ πresponse_ with_ csrf - Performs HTTP HTML response with CSRF.
- http_
html_ πresponse_ with_ headers - http_
hx_ πredirect - Performs an HTMX-compatible redirect response.
- http_
json_ πresponse - Performs HTTP JSON response.
- http_
reason_ πphrase - http_
response_ πinsert_ header - Performs HTTP response insert header.
- http_
route_ πredirect - Performs HTTP route redirect.
- http_
route_ πredirect_ clear_ session - Performs HTTP route redirect clear session.
- http_
route_ πredirect_ for_ request - Performs a redirect response that preserves enhanced-form navigation.
- http_
route_ πredirect_ with_ session - Performs HTTP route redirect with session.
- http_
static_ πresponse - Performs HTTP static response.
- http_
status_ πline - Performs HTTP status line.
- http_
stream_ πerror - Encodes a streaming selection error including the required unsatisfied range header.
- http_
text_ πresponse - Performs HTTP text response.
- ignore_
non_ πcontract_ artifact_ entry - Performs ignore non contract artifact entry.
- infer_
repo_ πroot_ from_ app_ root - Performs infer repo root from app root.
- initialize_
missing_ πapp_ runtime_ state - Initializes missing file-backed runtime state from an app-owned declarative seed.
- inspect_
app_ artifact_ json - Builds an inspection report for one app artifact tree.
- inspect_
app_ performance_ json - Builds a performance-oriented inspection report for one app artifact tree.
- install_
runtime_ πshutdown_ signal_ handlers - is_
business_ πavailability_ create_ path - Returns whether business availability create path.
- is_
lazy_ πmodel_ payload_ path - is_
opaque_ πstatic_ docs_ path - json_
artifact_ πstring - Performs JSON artifact string.
- json_
content_ πtype_ required_ response - Returns the canonical response for a JSON-only action reached with the wrong content type.
- json_
runtime_ πstring - Performs JSON runtime string.
- json_
string π - Performs JSON string.
- load_
app_ runtime_ for_ single_ app_ direct - Loads runtime state for one directly targeted app.
- load_
app_ runtime_ from_ artifact - Loads one app runtime from a built artifact tree.
- load_
packaged_ artifact - Loads one packaged artifact into an app runtime view.
- load_
runtime_ stack_ direct - Loads the complete runtime stack from the current runtime root.
- log_
runtime_ app_ config_ missing - Reports whether runtime config is missing for one app.
- log_
startup_ πapp_ timing - login_
error_ πresponse - Performs login error response.
- login_
error_ πresponse_ with_ status - Performs login error response with status.
- matched_
app_ πroute - Resolves the most specific declarative route for a request method and path.
- metadata_
changed_ πunix_ nanos - metadata_
fingerprint_ πfor_ path - metadata_
matches_ πoutput - metadata_
unix_ πnanos - migration_
state_ πcache_ path - mounted_
route_ πpattern - Normalizes dynamic route parameters for deterministic collision comparison. Joins an application mount and route path into one owned HTTP namespace.
- native_
session_ πtoken_ hash - Performs native session token hash.
- normalized_
booking_ πtime - Converts validated booking form time fields to canonical 24-hour
HH:MMstorage. - open_
runtime_ πlistener - Opens runtime listener.
- output_
metadata_ πfield - output_
path_ πcheck - Performs output path check.
- packaged_
artifact_ root_ matches - Returns whether a packaged artifact root matches the expected app identity.
- path_
has_ πruntime_ component - Performs path has runtime component.
- path_
last_ πsegment - Performs path last segment.
- payment_
provider_ πcheckout_ action_ response - Runs checkout against either configured database authority or a declared file app.
- payment_
provider_ πcheckout_ provider_ for_ action - Finds the provider bound to a declarative provider-checkout action for an app.
- payment_
provider_ πfeedback_ message_ response - payment_
provider_ πfeedback_ response - persist_
background_ πstate - Commits a scoped database worker view or a declared file-backed app mutation.
- persist_
file_ πbackground_ state - Persists a file-backed appβs bounded worker state without a database write.
- populate_
static_ πpage_ ui_ params - Populates canonical controls for static app pages without embedding authored markup in Rust.
- prepare_
app_ artifact - Prepares one app artifact tree for runtime loading.
- preserve_
model_ πpayload_ mtime - Preserves source timestamps for model payloads so cached model archives pass ownership checks.
- process_
one_ πbackground_ job - Claims and completes one durable queued job under the state transaction lock.
- public_
http_ πvalidation_ details - Extracts bounded public validation context without copying arbitrary failure payload fields.
- public_
http_ πvalidation_ message - Builds a readable summary from already filtered public validation details.
- push_
opaque_ πstatic_ docs_ ownership_ output - read_
generated_ πownership_ outputs - read_
http_ πrequest - Reads HTTP request.
- read_
manifest_ πjson - Reads manifest JSON.
- read_
source_ πmanifest_ value - Reads source manifest value.
- reject_
overloaded_ πconnection - Sends the explicit bounded-queue overload response and closes the connection.
- remove_
non_ πmanifest_ yaml_ from_ artifact - Removes non manifest YAML from artifact.
- resolve_
build_ πdir_ for_ runtime_ loading - Resolves build dir for runtime loading.
- route_
request_ πhook_ failure - Enforces narrow route-level request admission hooks before action execution.
- route_
request_ πmiddleware_ failure - Performs route request middleware failure.
- route_
request_ πvalidation_ report - Returns a bounded validation report for one route-level request admission failure.
- route_
requires_ πstate_ mutation_ guard - Performs route requires state mutation guard.
- runtime_
app_ πdeclares_ framework_ webhook_ endpoint - Performs runtime app declares framework webhook endpoint.
- runtime_
app_ πsummary_ value - Performs runtime app summary value.
- runtime_
apps_ dir - Resolves the directory that contains runtime apps.
- runtime_
apps_ fingerprint - Builds a stable fingerprint for the currently loaded runtime apps.
- runtime_
build_ dir_ override - Resolves the effective runtime build-directory override.
- runtime_
build_ πidentity_ value - Joins binary, source, dependency, configuration, and app-contract identity.
- runtime_
capability_ status - Returns the runtime capability scaffold exposed by the native host.
- runtime_
config_ πfingerprint - Computes a secret-free fingerprint of effective runtime behavior.
- runtime_
days_ πfrom_ civil - Performs runtime days from civil.
- runtime_
default_ πbackend - Performs runtime default backend.
- runtime_
default_ πenvironment - Performs runtime default environment.
- runtime_
failed_ πapp_ response - Performs runtime failed app response.
- runtime_
failed_ πapp_ summary_ value - Performs runtime failed app summary value.
- runtime_
fingerprint_ πtarget - Performs runtime fingerprint target.
- runtime_
framework_ πwebhook_ endpoint_ id - Performs runtime framework webhook endpoint ID.
- runtime_
framework_ πwebhook_ response - Performs runtime framework webhook response.
- runtime_
integration_ πfixture_ path - Performs runtime integration fixture path.
- runtime_
is_ πleap_ year - Performs runtime is leap year.
- runtime_
load_ πyaml_ or_ json_ value - runtime_
loaded_ πapp_ context - Performs runtime loaded app context.
- runtime_
log_ banner_ lines - Builds the startup banner lines for the native runtime.
- runtime_
match_ app - runtime_
match_ πfailed_ app - Performs runtime match failed app.
- runtime_
parse_ πyaml_ file - runtime_
report_ id_ for_ verb - Maps a runtime verb to its stable report identifier.
- runtime_
route_ πresponse_ with_ request - Performs runtime route response with request.
- runtime_
shutdown_ πrequested - runtime_
stack_ probe_ ready - Runs a readiness probe across the loaded runtime stack.
- runtime_
stack_ refresh_ required - Returns whether the runtime stack should be reloaded.
- runtime_
timestamp_ πoffset_ seconds - Performs runtime timestamp offset seconds.
- runtime_
timestamp_ πparse_ date - Performs runtime timestamp parse date.
- runtime_
timestamp_ πparse_ time - Performs runtime timestamp parse time.
- runtime_
timestamp_ πseconds - Parses one bounded runtime timestamp from epoch seconds or UTC text.
- runtime_
timestamp_ πseconds_ utc_ text - Performs runtime timestamp seconds utc text.
- runtime_
verb_ supported - Returns whether a CLI/runtime verb is supported by the native host.
- serve_
app_ runtime_ direct_ for_ test - Starts a direct single-app runtime path for tests.
- serve_
app_ πruntime_ with_ limit - Performs serve app runtime with limit.
- serve_
runtime_ stack - Starts the shared multi-app runtime server.
- serve_
runtime_ stack_ direct_ for_ test - Starts the shared runtime in a direct test-oriented path.
- serve_
runtime_ πstack_ with_ limit - Performs serve runtime stack with limit.
- serve_
single_ app - Starts the single-app runtime server.
- sha256_
hex π - Returns a lowercase SHA-256 digest without an external encoder.
- shared_
bootstrap_ πicons_ root - Finds the repository-level Bootstrap Icons source shared by app builds.
- should_
use_ πmetadata_ integrity - start_
runtime_ πjob_ worker - Starts one background poller that dispatches durable jobs for every enabled app.
- startup_
timing_ πenabled - stop_
runtime_ πworkers_ and_ flush - system_
time_ πunix_ nanos - timestamp_
after_ πseconds_ utc - Performs timestamp after seconds utc.
- tree_
content_ πdigest - Hashes a deterministic file tree while optionally excluding one relative file.
- tree_
content_ πdigest_ with_ cached_ outputs - trusted_
browser_ πorigin - Rejects browser mutations whose Origin does not match the request Host.
- ucal_
accept_ πbusiness_ invite_ response - ucal_
business_ πapi_ actor_ manages_ business - Checks a generated UCAL business API route through relational feature queries.
- ucal_
business_ πapi_ feature_ context - Builds the feature request context for one UCAL generated business API route.
- ucal_
business_ πapi_ feature_ list_ response - Converts a UCAL feature query result into the generated API list response shape.
- ucal_
generated_ πapi_ mutation_ action - Resolves one UCAL generated API mutation path to its declared feature action.
- ucal_
generated_ πapi_ mutation_ response - Executes one UCAL generated API mutation through declared feature actions.
- ucal_
invite_ πaccept_ page_ response - ucal_
issue_ πbusiness_ invite_ response - validate_
runtime_ πstack_ ownership - Rejects duplicate ownership claims before the runtime binds a listener.
- verify_
app_ πmigration_ state - Verifies the manifest-selected logical migration contract without exporting app data.
- verify_
app_ πmigration_ state_ cache_ key - Keys verification by the logical contract, configured data source, and adapter-owned ledger.
- verify_
generated_ πownership_ manifest - Verifies every output digest declared by the generated ownership manifest.
- verify_
generated_ πownership_ output - Verifies one generated ownership output entry against the artifact and optional source copy.
- warm_
runtime_ πconfig_ allowlist - Warms the bounded allowlisted configuration cache for one mounted app request.
- website_
report_ πpath - Performs website report path.
- with_
action_ πeffects - Binds the declared durable effects to a request-scoped logical store. The adapter commits them with the domain mutation, preserving result indices.
- write_
generated_ πownership_ manifest - Writes generator ownership and output digests for every app artifact file.
- write_
report_ πfile - Writes report file.
- write_
stream_ πresponse - Copies one selected file range to an accepted connection with a fixed-size buffer.
- write_
verified_ πmigration_ state_ cache