Skip to main content

Module runtime

Module runtime 

Source
Expand description

Provides the runtime module.

Β§Examples

β“˜
use pharos_native::runtime;

ModulesΒ§

agent_architect
Exposes Architect webapp-owned agent worker services.
agent_bridge
Exposes the agent_bridge runtime 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 backup runtime module.
business
Exposes the business runtime module.
cache
Exposes the cache runtime module.
cache_key
Exposes the cache_key runtime module.
connection
Exposes the connection runtime module.
database
Exposes the database runtime module.
declarative
Exposes the declarative runtime module.
docs
Exposes the docs runtime module.
dynamic
Exposes the dynamic runtime 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_runtime runtime module.
features
Exposes the features runtime module.
fs
Exposes the fs runtime module.
generated
Exposes the generated runtime module.
http
Exposes the http runtime module.
job
Exposes the job runtime module.
json_commands
Exposes the json_commands runtime module.
json_ops
Exposes the json_ops runtime module.
listener
Exposes the listener runtime module.
ops_bridge
Exposes the ops_bridge runtime 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 reference runtime module.
runtime_reports
Exposes the runtime_reports runtime module.
runtime_stack
Exposes the runtime_stack runtime module.
social_connections πŸ”’
Framework-owned external-account controllers. These routes never issue a local login session.
state_store
Exposes the state_store runtime module.
support
Exposes the support runtime module.
ui
Exposes the ui runtime module.
worker_pool
Exposes the worker_pool runtime module.

StructsΒ§

RootRuntimeAppLoadService πŸ”’
RootRuntimeRequestService πŸ”’
Finds the mounted app that matches a request path.
RuntimeScaffold
Advertised runtime capability scaffold for the current host build.

EnumsΒ§

AcceptedConnection πŸ”’
CapabilityState
Availability state for one runtime capability.
PostgresTlsMode
TLS policy enforced for PostgreSQL runtime connections.
RuntimeListener πŸ”’

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Β§

RUNTIME_SHUTDOWN_REQUESTED πŸ”’

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:MM storage.
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 πŸ”’

Type AliasesΒ§

FrameworkBuiltinResponse
RuntimeAppLoadFailure
RuntimeStack