Expand description
Workflow-facing application services for AHRI TRE.
ahri_tre_app coordinates metadata repositories, lake adapters, source SQL
analysis, and authentication/session inputs into user-facing operations. It
deliberately keeps concrete PostgreSQL, DuckDB, and OAuth wiring behind
adapter crates so workflows can depend on a stable application boundary.
Re-exports§
pub use error::AppError;pub use error::RegistrationResource;pub use service::AcquisitionAuthorization;pub use service::AppRepositories;pub use service::AppService;pub use service::AuthenticatedDataStoreSession;pub use service::acquire_ingest_file_content;pub use session::DataStoreSession;pub use session::SessionMetadataRepositories;pub use session::StoreSessionConnection;pub use sql_source::SqlSourceConnection;pub use access_request::*;pub use projections::*;pub use query::*;pub use requests::*;
Modules§
- access_
request - Study access-request submission workflow and its application port. Study access-request workflows.
- disclosure
- Trusted disclosure workflow and evidence coordination. SQL and ledger mechanics remain with metadata and Lake adapters, respectively.
- error
- Application-level error type.
- projections
- Projection helpers for public protocol DTOs.
- query
- Lake query request planning and authorization.
- requests
- Request and response data transfer types for application workflows.
- service
- The main application service facade.
- session
- Datastore session construction and repository grouping.
- sql_
source - External SQL source analysis and import preparation.
Structs§
- Browser
Data File Discovery Source Record - Browser
Data File Metadata Source - Narrow Datafile facts allowed to cross from the runtime adapter into the application workflow. Storage, digest, key, content, and preview facts cannot be represented here.
- Browser
Data File Version Discovery Source Record - Browser
Dataset Discovery Source Record - Browser
Dataset Version Discovery Source Record - Browser
Datastore Discovery Error - Safe failure exposed by a browser Datastore discovery capability.
- Browser
Dictionary Discovery Source - Metadata-only source values required to project one browser dictionary.
- Browser
Dictionary Variable Catalogue Record - Catalogue search record carrying the domain name used by name predicates.
- Browser
Dictionary Variable Discovery Source Record - Adapter-owned source metadata for one browser-visible dictionary variable.
- Browser
Domain Source Record - Browser
Domain Variable Source Record - Browser
Provenance Summary Source Record - Runtime-owned provenance input from which the app builds the browser-safe projection.
- Browser
Resource Discovery Source - Browser
Semantic Catalog Discovery Source - Browser
Semantic Entity Catalogue Record - Browser
Semantic Entity Source Record - Browser
Semantic Relation Catalogue Record - Browser
Semantic Relation Source Record - Browser
Study Discovery Source - Browser
Study Discovery Source Record - Browser
Vocabulary Discovery Source Record - Adapter-owned vocabulary metadata and visible items.
- Browser
Vocabulary Mapping Discovery Source Record - Adapter-owned source values for one vocabulary mapping.
- Browser
Vocabulary Mapping Source Record - Browser
Vocabulary Source - Configured
Datastore Creation Provisioner - Production PostgreSQL and DuckLake adapter implementation of the creation saga.
- Configured
Session Reference - Created
Catalog Credential - Safe metadata for the binding-owned credential created during the saga.
- Datastore
Creation Failure - Datastore
Reachability - Safe result of reaching one identity-bound Datastore through a live Session.
- Governance
Upgrade Progress - One resumable operator batch. Safe metadata remains available while any of these prerequisites is pending; ordinary Session opens cannot invoke it.
- Lake
Reachability - Safe DuckLake readiness facts returned by the application workflow.
- Live
Session Identifier - Opaque public identifier paired with one process-ephemeral live Session.
- Metadata
Store Reachability - Safe PostgreSQL readiness facts returned by the application workflow.
- Open
Configured Datastore Request - Already-resolved authority required to open one configured Datastore.
- Pending
Configured Datastore Creation - Privileged
Datastore Creation Handler - Authenticated handler that turns logical create intent into one durable saga.
- Resolved
Creation Storage Secret - One storage Secret paired with the exact configured reference that authorized it.
- Session
Observations - Holds only the latest authentication, metadata and Lake observations. Clones belong to the same live Session, including its admitted background work.
- Staged
Catalog Credential - Protected stage carried only by the Datastore credential owner workflow.
Enums§
- Archive
Mode - Controls whether delete operations must archive records before removal.
- Browser
Data File Workflow Error - Browser
Dataset Workflow Error - Browser
Dictionary Discovery Error - Closed workflow failures returned by browser dictionary discovery.
- Browser
Dictionary Discovery Resource Target - Adapter-resolved resource identity used to build the public resource reference.
- Browser
Domain Discovery Error - Browser
Provenance Catalogue Source Record - A direction-neutral public catalogue target resolved behind the metadata adapter.
- Browser
Resource Discovery Error - Browser
Semantic Catalog Discovery Error - Browser
Study Discovery Error - Browser
Study Workflow Error - Browser
Variable Workflow Error - Failures returned by the browser variable-search workflow.
- Configured
Datastore Open Error - Failure opening a configured Datastore for an authenticated Session.
- Datastore
Creation Start - Delete
Target - Domain object targeted by an archive/delete request.
- TagAttachment
Target
Constants§
- BROWSER_
DICTIONARY_ DISCOVERY_ AUTHORITY - Stable authority label emitted by browser dictionary discovery responses.
- BROWSER_
DISCOVERY_ AUTHORITY - BROWSER_
RESOURCE_ DISCOVERY_ AUTHORITY - BROWSER_
SEMANTIC_ CATALOG_ DISCOVERY_ AUTHORITY - BROWSER_
STUDY_ DISCOVERY_ AUTHORITY
Traits§
- Browser
Datastore Discovery Capability - Adapter capability accepted by the app-owned discovery workflow.
- Browser
Dictionary Discovery Capability - Read-only capability required by browser dictionary discovery and search.
- Browser
Domain Discovery Capability - Metadata-only capability consumed by Domain and Vocabulary browser workflows.
- Browser
Resource Discovery Capability - Resolved adapter capability used by the application-owned resource discovery and catalogue-search workflows.
- Browser
Semantic Catalog Discovery Capability - Browser
Study Discovery Capability - Resolved adapter capability used by the application-owned Study workflow.
- Datastore
Creation Authority - Trusted authority retained by the handler. Clients never receive these capabilities.
- Datastore
Creation Provisioner - Adapter-owned phases of the cross-store creation saga.
- Datastore
Secret Resolver - Trusted operation capability that resolves only the binding-owned catalog credential.
Functions§
- browser_
datafile_ search_ response - browser_
dataset_ search_ response - browser_
dictionary_ discovery_ response - Projects adapter-owned metadata into the stable browser dictionary DTO.
- browser_
dictionary_ variable_ search_ response - Filters, orders, pages, and projects browser-visible variable metadata.
- browser_
model_ entity_ search_ response - browser_
model_ relation_ search_ response - browser_
resource_ discovery_ response - browser_
semantic_ catalog_ discovery_ response - browser_
study_ discovery_ response - browser_
study_ facts - browser_
study_ get_ response - browser_
study_ search_ response - discover_
browser_ dictionary - Discovers and projects one resource dictionary through a resolved capability.
- discover_
browser_ ready_ datastores - Discovers the configured browser Datastore through an already-resolved adapter capability and returns only safe stable DTOs.
- discover_
browser_ resources - discover_
browser_ studies - discover_
browser_ study - get_
browser_ domain - get_
browser_ domain_ variable - get_
browser_ vocabulary - inspect_
datastore_ session - Probes PostgreSQL and DuckLake through the capabilities retained by one already-authorized Session. Configuration, Secret stores, and topology are neither reopened nor projected by this workflow.
- key_
role_ label - Returns the stable protocol label for a variable key role.
- list_
browser_ domain_ studies - list_
browser_ domain_ variables - list_
browser_ domains - list_
browser_ vocabulary_ items - list_
browser_ vocabulary_ mappings - observe_
browser_ workflow - Runs one Browser workflow with explicit child context for its resolved capability.
- open_
configured_ datastore - Opens one configured Datastore from resolved runtime authority without requiring an otherwise unrelated application repository set.
- open_
configured_ datastore_ for_ session - Opens a Datastore while preserving OAuth authentication rejection.
- open_
configured_ datastore_ for_ session_ observed - Times the app workflow using its already authorized inputs and resolver.
- open_
configured_ datastore_ with_ observations - Runs the existing open workflow while retaining its actual adapter evidence.
- open_
operation_ control - Opens only PostgreSQL under current user authority; never attaches Lake or resolves its Secrets.
- project_
browser_ ready_ datastores - Projects adapter-owned operational discovery into the stable browser-safe response without exposing topology, credentials, or maintenance states.
- reconcile_
configured_ dataset_ operations - Startup maintenance for a configured Datastore, before the listener schedules user work. Missing/unavailable Datastores are retried on explicit Session open. No Session, user identity, Current study, or output admission is created here.
- resolve_
file_ asset_ encryption - Resolves a File Asset encryption choice independently of DuckLake catalog encryption, defaulting new File Assets to encrypted storage.
- resource_
discovery_ failure_ response - search_
browser_ datafiles - search_
browser_ datasets - search_
browser_ model_ entities - search_
browser_ model_ relations - search_
browser_ studies - search_
browser_ variables - Searches browser-visible dictionary variables with stable cursor semantics.
- semantic_
catalog_ discovery_ failure_ response - variable_
record - Projects one adapter source record into its browser-safe variable DTO.