#![doc = include_str!("../README.md")]
#![forbid(unsafe_code)]
mod admin;
mod api_key;
mod budget;
mod classifier_agreement;
mod classifier_routing;
mod config;
mod cooldown;
mod cost;
mod csv;
mod email;
mod events;
mod harness;
mod http;
mod idempotency;
mod lint;
mod logging;
mod module;
mod origin;
mod outbox;
mod personal_data;
mod ports;
mod problem;
mod problems;
mod rate_limit;
mod route_policy;
mod scheduled;
mod scope;
mod sidecar;
mod signer;
pub mod billing;
pub mod sigv4;
pub mod sse;
mod stream;
mod structured_output;
mod surface;
mod template;
mod tenant;
mod tenant_conn;
mod tenant_lifecycle;
mod text_chunks;
mod tool_loop;
mod usage;
mod venture;
mod webhook_signature;
pub use axum;
pub use admin::{bearer_token, constant_time_eq, require_admin};
pub use api_key::{
ApiKeyError, ApiKeyMode, ApiKeyPrincipal, ApiKeys, IssuedKey, RandomBytes, RandomError,
require_api_key,
};
pub use budget::{
Budget, BudgetRouter, BudgetedHttpClient, DEFAULT_ALERT_TABLE, DEFAULT_BUCKET_TABLE,
DEFAULT_QUOTA_TABLE, EVENT_QUOTA_EXHAUSTED, EVENT_QUOTA_WARNING, Idempotent, RetryPolicy,
Sleeper,
};
pub use classifier_agreement::{
AgreementAt, AgreementLog, AgreementReport, CalibrationPoint, CorpusItem, Disagreement,
GroundTruth, KindAgreement, answer_margin, measure_agreement, values_agree,
};
pub use classifier_routing::{
RouteReason, Routed, RoutingClassifier, RoutingError, RoutingMode, RoutingPolicy,
ShadowClassifier, Thresholds,
};
pub use config::{Config, ConfigError, EmptyConfig, HarnessConfig, MapConfig, ModuleConfig};
pub use cooldown::SendCooldown;
pub use cost::{
Accounting, AdapterId, CallOutcome, CallRecord, CallRole, Cost, CostLedger, InMemoryLedger,
LedgerTotals, Price, PriceSheet, QuestionKind, TokenSource, Tokens,
};
pub use csv::{FORMULA_PREFIXES, MAX_EXPORT_ROWS, escape as csv_escape, row as csv_row};
pub use email::{
MAX_EMAIL_BYTES, MAX_LOCAL_BYTES, invalid_email_problem, is_valid,
normalize as normalize_email, validation_error,
};
pub use events::{AnyError, EventBus, EventHandler, EventName};
pub use harness::{Harness, HarnessBuilder, Runtime};
pub use http::{
Form, Json, MAX_BODY_BYTES, RequestSummary, X_REQUEST_ID, allowance_exhausted, rate_limited,
request_id_is_valid,
};
pub use idempotency::Inbox;
pub use lint::{CARD_DATA, card_data_hit, created_tables, lint_card_data, lint_portable_sql};
pub use logging::{
ControlLevel, RedactingVisitor, forward_control_event, is_email_field, is_secret_field,
redacted_value, scrub_request_url, scrub_text, set_error_forwarder, set_log_pseudonym_key,
subject_hash,
};
pub use module::{
BoxFuture, HARNESS_API, Migrations, Module, ModuleContext, SqlMigration, assert_migration_set,
harness_api_mismatch, is_idempotent_sql, migration_checksum, migration_edited,
migration_missing_guard,
};
pub use origin::{OriginError, origin_of};
pub use outbox::{DrainOptions, DrainReport, Outbox, OutboxRecord, Processed};
pub use personal_data::{
CatalogEntry, DataKind, Disposition, PersonalDataCatalog, PersonalDataSet, SubjectVia,
is_plain_identifier, migration_tables, undeclared_tables, unlisted_tables,
};
pub use ports::{
ACTOR_CALL_TIMEOUT, ActorContext, ActorError, ActorHandler, ActorHandlers, ActorStore,
ActorWrites, Actors, Answer, AnswerValue, Auth, AuthError, Blob, BlobError, BlobObject,
BoundedHttpClient, ByteStream, Calibration, Caller, Capability, Captcha, CaptchaBinding,
CaptchaError, CertificateStatus, Charge, CheckoutRequest, CheckoutSession, Classifier,
ClassifierError, ClassifierProfile, Clock, Completion, CompletionBuilder, ConnectAccountLink,
ConnectAccountLinkRequest, Credential, CustomHostname, CustomHostnameError, CustomHostnames,
DEFAULT_MAX_STATE_CHARS, DEFAULT_MAX_TOKENS, DEFAULT_RESPONSE_TIMEOUT,
DEFAULT_STREAM_IDLE_TIMEOUT, DEFAULT_STREAM_TOTAL_TIMEOUT, Database, DbError, Decision, Defer,
Destination, DispatchError, Dispatcher, DnsRecordType, EmbedError, Embedder, Embeddings,
ExactVectorIndex, Filed, FinishReason, HostnameClaim, HostnameRefusal, HttpClient, HttpError,
HttpPolicy, IdGen, ImageLimit, ImageMediaType, InboundStatusError, KeyValue, Kid, KvError,
LineItem, LocKeys, MAX_ACTOR_KEY_BYTES, MAX_ACTOR_KIND_BYTES, MAX_ACTOR_MESSAGE_BYTES,
MAX_ACTOR_REPLY_BYTES, MAX_ACTOR_VALUE_BYTES, MAX_BLOB_BYTES, MAX_CONCURRENT_REQUESTS,
MAX_IMAGE_ENCODED_BYTES, MAX_KID_NAME, MAX_NAMESPACE_BYTES, MAX_PROMPT_IMAGE_ENCODED_BYTES,
MAX_PROMPT_IMAGES, MAX_RESPONSE_BYTES, MAX_RESPONSE_TIMEOUT, MAX_STREAM_BYTES,
MAX_STREAM_IDLE_TIMEOUT, MAX_STREAM_TOTAL_TIMEOUT, MailError, MailProvider, Mailer, Member,
Message, ModelTier, Money, NoopDefer, Notification, Part, Payload, Payments, PaymentsError,
Platform, Port, Ports, Priority, Prompt, ProviderStatus, Push, PushError, PushOutcome,
Question, Quota, RateLimitError, RateLimiter, Realtime, RealtimeError, Recipient, Refund,
RefundRequest, Role, RoomContext, RoomHandler, RoutingPush, RoutingTextModel, RoutingTracker,
Row, Rows, ScopedActors, ScopedBlob, SendOutcome, Severity, SignatureError, Signer, Statement,
StatusOnly, StatusUpdate, StatusWebhook, StreamPolicy, Subject, SubscriptionCheckoutRequest,
SystemClock, TextDelta, TextModel, TextModelError, TicketComment, TicketDraft, TicketState,
TicketStatus, ToolCall, ToolChoice, ToolResult, ToolSpec, Tracker, TrackerError,
TransferCharge, TryFromValue, Turn, UlidIdGen, Unconfigured, UsageReport, UsageReported,
Validation, ValidationMethod, VectorFilter, VectorIndex, VectorIndexError, VectorMatch,
VectorNamespace, VectorRecord, Verdict, WebhookEvent, check_actor_call, check_blob_size,
check_hostname, completion_deltas, declared_content_length, encode_image, encoded_image_len,
receive_status, retry_after, run_actor_alarm, run_actor_message, stream_owned, timeout,
ttl_secs, validate_actor_key, validate_actor_kind, validate_questions,
};
pub use ports::{
Dispute, DisputeListRequest, DisputePage, DisputePhase, DisputeStatus, PortalSession,
PortalSessionRequest, Subscription, SubscriptionStatus,
};
pub use ports::{
AudioFormat, DEFAULT_MAX_AUDIO_BYTES, DEFAULT_MAX_AUDIO_SECONDS, DEFAULT_MAX_SYNTHESIS_CHARS,
NotConfiguredSpeech, Speech, SpeechCapabilities, SpeechError, SpeechLimit, SpeechLimits,
SpeechUsage, Synthesis, SynthesizeRequest, TranscribeRequest, Transcript, Voice, WordTiming,
check_synthesize, check_transcribe, primary_subtag, wav_duration,
};
pub use ports::{
CachedUrlSafety, DEFAULT_CACHE_CAPACITY, DEFAULT_MAX_BATCH, DEFAULT_MAX_URL_LEN,
DEFAULT_NEGATIVE_TTL, ThreatType, UrlSafety, UrlSafetyError, UrlSafetyLimit, UrlSafetyLimits,
UrlSafetySource, UrlVerdict, check_batch, check_url,
};
pub use ports::{DEFAULT_PRESIGN_TTL, MAX_PRESIGN_TTL, PresignedPut};
pub use ports::{InboundMailError, InboundMailSource, InboundMessage, receive_mail};
pub use ports::{
BlobMeta, BlobPage, BlobStream, MAX_LARGE_BLOB_BYTES, MAX_LIST_LIMIT, MAX_MULTIPART_PARTS,
MIN_MULTIPART_PART_BYTES, PartReceipt, PendingUpload, UploadId, blob_error_from_stream,
check_part_number, limit_stream,
};
pub use problem::{ABOUT_BLANK, Problem};
pub use problems::{ProblemDef, SLUGS, Slugs, registry as problem_registry};
pub use rate_limit::{RateLimit, RateLimitFailure, check_rate_limit, client_ip, rate_limit_keys};
pub use route_policy::{
ALLOW_UNLIMITED_PUBLIC_ROUTES, ALLOW_UNPROTECTED_WRITES, RoutePolicy, SignatureVerification,
WriteGuards, captcha_effective, deployed_env, env_disagreement, payments_effective,
production_readiness, rate_limiter_effective, signer_effective, stated_reason,
unlimited_public_routes_override, unprotected_writes_override, verify_human_form,
webhook_secret_readiness,
};
pub use scheduled::{ScheduledBudget, ScheduledLimits, ScheduledSplit};
pub use scope::Scope;
pub use sidecar::{
GATEWAY_ADMIN_PURPOSE, GATEWAY_PURPOSE, GATEWAY_TOKEN_TTL_SECS, HARNESS_ONE_WORKER,
HARNESS_SIDECARS, SIDECAR_GATEWAY_SECRET, SIDECAR_REQUIRE_GATEWAY, SidecarMount, SidecarMounts,
X_HARNESS_API, X_HARNESS_GATEWAY, X_HARNESS_MODULE,
};
pub use signer::{
CONFIRM_TOKEN_MAX_TTL_SECS, DEFAULT_TOKEN_MAX_TTL_SECS, HmacSigner, KeyRing, KeyState,
MIN_SECRET_BYTES, RingKey, STATUS_TOKEN_MAX_TTL_SECS, SignerError, TokenPolicy,
UNSUBSCRIBE_ACTION,
};
pub use stream::{BoxStream, RequestStream, ResponseStream, StreamError, StreamRoute};
pub use structured_output::TextModelExt;
pub use surface::{
Action, Audience, Column, HINT_KEYWORDS, MAX_SIDECAR_ACTIONS, MAX_SIDECAR_SURFACE_BYTES,
MAX_SIDECAR_VIEWS, ModuleSurface, Outcome, RenderedSurface, SURFACE_API, Surface,
SurfaceDocument, SurfaceSource, UiContext, UiMount, VentureSurface, View, hint_field,
schema_for,
};
pub use template::{Rendered, Template, TemplateError, TemplateRegistry};
pub use tenant::{
IMPLICIT_TENANT, ImplicitTenant, Resolution, ResolveTenant, Tenancy, Tenant, TenantDatabases,
TenantDbError, TenantId, TenantRouting, TenantStatus,
};
pub use tenant_conn::TenantConn;
pub use tenant_lifecycle::{
ErasureStep, TenantLifecycle, TenantLifecycleError, TenantSummary, remaining_erasure,
};
pub use text_chunks::{TextModelChunkedExt, reassemble_text_chunks, split_text_chunks};
pub use tool_loop::{
StepUsage, ToolBudget, ToolExecutor, ToolLoopError, ToolLoopEvent, ToolLoopOutcome,
run_tool_loop, run_tool_loop_stream,
};
pub use usage::{Consumed, Consumption, Exhausted, Months, Period, PeriodWindow, Usage};
pub use venture::{Brand, Venture, VentureEnv};
pub use webhook_signature::{
DEFAULT_TOLERANCE_SECS, Digest, Github, Gitlab, ProviderScheme, SharedTokenScheme,
SignatureEncoding, SignatureScheme, SignedDelivery, StripeStyle, Svix, Vercel, WebhookVerifier,
svix_secret_key,
};