Python API reference
This inventory is generated from the package's public export surface. Unknown or internal symbols are deliberately excluded.
__version__โ Constant. Public__version__constant.ACCOUNT_TOKEN_LOCKSโ Constant. PublicACCOUNT_TOKEN_LOCKSconstant.AccountRefreshResultโ Class. What a refresh did, without the Account Token itself.AccountRevocationResultโ Class. A revocation the company acknowledged; the local copy is gone.AccountTokenClientโ Class. Use a stored Account Token without ever handing it to a caller.AccountTokenContextโ Class. Where an Account Token is used, and for whom (all non-secret).AccountTokenLockโ Class. Serialize every use of one Account Token (PAP ยง4.8 rotation).AgentIdentityClientโ Class. Fetch and verify a personal agent's public identity documents.ApiClientโ Class. Read and change through a company's API, the credentials host-owned.ApiErrorโ Class. The company refused an API call;codeis its error, never its body.ApiResponseโ Class. A successful API answer: the body, or the operation it proposes.APPROVAL_SURFACESโ Constant. PublicAPPROVAL_SURFACESconstant.ApprovalRequestโ Class. A live-session action that changes or ends what the user holds, to approve first.ApprovalSurfaceโ Class. The host's own approval surface: the user, not a model, answers.approveโ Function. Record the user's approval of the revision the host just showed them.ApprovedUrlโ Class. A URL the safety policy approved, and the addresses it approved for its host.AUTHORIZATION_STATE_STORESโ Constant. PublicAUTHORIZATION_STATE_STORESconstant.AuthorizationCodeGrantโ Class. Redacted PAP authorization-code exchange values.AuthorizationErrorโ Class. An authorization flow failed without exposing callback secrets.AuthorizationStateStoreโ Class. Persist and atomically consume short-lived authorization state.BROWSER_ASSERTION_TYPEโ Constant. PublicBROWSER_ASSERTION_TYPEconstant.BROWSER_FORM_POSTSโ Constant. PublicBROWSER_FORM_POSTSconstant.BROWSER_HANDOFFSโ Constant. PublicBROWSER_HANDOFFSconstant.BrowserAssertionClaimsโ Class. Claims that bind a controlled browser to one PAP Session.BrowserAssertionReplayCacheโ Class. PublicBrowserAssertionReplayCacheclass.BrowserFormPostโ Class. Submit protected fields as a controlled top-level browser navigation.BrowserHandoffโ Class. Hand a human-only authorization URL to a trusted browser surface.BrowserSessionClientโ Class. Sign and POST a browser assertion without putting it in a URL.BrowserSessionErrorโ Class. A browser-session handoff or assertion failed safely.BrowserSessionStartโ Class. Safe status after a controlled form POST has started.build_browser_assertion_claimsโ Function. Build unsigned PAP section 5 claims for protected signing.build_direct_sign_in_requestโ Function. Build a user-browser authorization URL with random state and S256 PKCE.build_pap_reactorโ Function. Build a PAP Reactor host with plugins and return any HTTP client it owns.build_session_assertion_claimsโ Function. Build unsigned PAP 4.2 claims; a key-custody provider signs them.CACHESโ Constant. PublicCACHESconstant.ClientMetadataโ Class. PublicClientMetadataclass.Clockโ Class. Supply timezone-aware wall-clock time to expiring protocol state.CLOCKSโ Constant. PublicCLOCKSconstant.ConfirmOutcomeโ Class. What a confirmation did.ConversationClientโ Class. Start and continue PAP conversations through a proof-bound transport.ConversationErrorโ Class. A PAP conversation request failed without exposing its body.ConversationEventโ Class. One ordered PAP conversation event, including unknown future types.ConversationEventPageโ Class. A cursor page returned by a PAP conversation read or waited write.ConversationReceiptโ Class. State returned after a message when the caller does not wait for events.ConversationResponseโ Constant. PublicConversationResponseconstant.coversโ Function. Whether a standing permission covers this revision, term by term.create_resolving_clientโ Function. Anhttpxclient whose every request goes through aResolvingTransport.CursorExpiredHandlerโ Constant. PublicCursorExpiredHandlerconstant.DEVICE_CODE_GRANTโ Constant. PublicDEVICE_CODE_GRANTconstant.DeviceAuthorizationResponseโ Class. Validated response from the OAuth device authorization endpoint.DeviceSignInClientโ Class. Start and poll PAP Device Sign-In without exposing the device code.DeviceSignInPollโ Class. One poll result; pending responses tell callers when to try again.DeviceSignInStartโ Class. User-facing device instructions without the private device code.DirectSignInCallbackโ Class. Validated one-time authorization code.DirectSignInClientโ Class. Orchestrate one-use browser authorization and proof-bound code exchange.DirectSignInRequestโ Class. Authorization request state that redacts its URL and PKCE values.DirectSignInResultโ Class. Signed-in Session plus any scopes the company did not grant.DirectSignInStartโ Class. Non-secret status returned after handing authorization to the user.DiscoveredCompanyโ Class. PublicDiscoveredCompanyclass.DISCOVERY_TRANSPORTSโ Constant. PublicDISCOVERY_TRANSPORTSconstant.DiscoveryClientโ Class. Discover and authenticate a company's PAP declaration.DiscoveryDocumentโ Class. PublicDiscoveryDocumentclass.DiscoveryErrorโ Class. Discovery could not be completed safely.DPOP_PROOF_PROVIDERSโ Constant. PublicDPOP_PROOF_PROVIDERSconstant.DpopHttpClientโ Class. Send replay-safe DPoP requests without forwarding credentials across origins.DpopKeyMaterialโ Class. Private signing handle and separately exportable public JWK.DpopProofProviderโ Class. Create a fresh DPoP proof while keeping its private key protected.DpopProofRequestโ Class. Inputs for one fresh proof-of-possession JWT.DpopReplayCacheโ Class. Atomically remember a proof ID until its acceptance window ends.FINAL_STATESโ Constant. PublicFINAL_STATESconstant.generate_message_idโ Function. Generate a user-global message ID with at least 128 random bits.generate_pairwise_user_idโ Function. Generate a non-PII user ID to persist for one user/company issuer pair.IdentityErrorโ Class. Personal-agent metadata or public keys could not be verified safely.InMemoryProtocolCacheโ Class. Defaultpap.cache: a bounded, least-recently-used map in one process.InMemoryStandingPermissionStoreโ Class. A single-process store of standing permissions, for examples and tests.InProcessAccountTokenLockโ Class. Default Account Token lock for a single process.JoseAlgorithmโ Constant. PublicJoseAlgorithmconstant.JoseDpopProofProviderโ Class. Create fresh RFC 9449 proofs using per-user/company key material.JoseSignerโ Class. Sign PAP assertions with an injected asymmetric private key or handle.JsonWebKeyโ Class. One asymmetric public signing key published by a personal agent.JsonWebKeySetโ Class. A non-empty set of public keys suitable for PAP assertion verification.JWT_BEARER_GRANTโ Constant. PublicJWT_BEARER_GRANTconstant.JWT_CLIENT_ASSERTIONโ Constant. PublicJWT_CLIENT_ASSERTIONconstant.MediatedSignInClientโ Class. Relay a user's credentials to the company's mediated endpoint, once.MediatedSignInResultโ Class. Where a Mediated Sign-In stands, without any credential.Messageโ Class. Message sent by either side or returned in a conversation event.MetadataFetchโ Class. The bounds of one public metadata fetch: size, total time, approved addresses.OAuthServerMetadataโ Class. PublicOAuthServerMetadataclass.openapi_urlโ Function. The company's OpenAPI description, when it advertises one.OpenTelemetrySinkโ Class.pap.telemetryas OpenTelemetry spans, one per event, under the current span.Operationโ Class. PublicOperationclass.OperationConfirmationโ Class. PublicOperationConfirmationclass.OperationErrorโ Class. An operation could not be read, confirmed, or cancelled.OperationResultโ Class. PublicOperationResultclass.operations_endpointโ Function. The company's operations endpoint when both sides list version 1, elseNone.OPERATIONS_EXTENSIONโ Constant. PublicOPERATIONS_EXTENSIONconstant.OPERATIONS_VERSIONโ Constant. PublicOPERATIONS_VERSIONconstant.OperationsClientโ Class. Read, confirm, and cancel operations at a negotiated endpoint.PAIRWISE_USER_ID_STORESโ Constant. PublicPAIRWISE_USER_ID_STORESconstant.PairwiseUserIdStoreโ Class. Persist stable random identities by tenant, local user, and issuer.PapCorePluginโ Class. Contribute PAP's secure defaults through Reactor.PersonalAgentProtocolErrorโ Class. Base error whose string representation never includes response bodies.pin_connectionsโ Function. Makeclient's socket transports dial approved addresses during metadata fetches.PinnedNetworkBackendโ Class. Dial the address the URL safety policy approved, never the host name again.ProofErrorโ Class. A signed assertion or proof-of-possession value is invalid.PROTECTED_INPUTSโ Constant. PublicPROTECTED_INPUTSconstant.ProtectedInputโ Class. Collect protected values from the user outside model context (PAP ยง4.7).ProtectedInputFieldโ Class. One field a human types into the host's own trusted surface.ProtectedInputRequestโ Class. What the host must ask the user for, and for which company.PROTOCOL_PROFILEโ Constant. PublicPROTOCOL_PROFILEconstant.PROTOCOL_REVISIONโ Constant. PublicPROTOCOL_REVISIONconstant.ProtocolCacheโ Class. Bound cached public protocol data by an absolute expiry.ProtocolValidationErrorโ Class. A protocol document is malformed or internally inconsistent.RANDOM_SOURCESโ Constant. PublicRANDOM_SOURCESconstant.RandomSourceโ Class. Supply cryptographically secure random bytes.RATE_LIMIT_BUDGETSโ Constant. PublicRATE_LIMIT_BUDGETSconstant.RateLimitBudgetโ Class. A company's request budget, shared by every task and user of the host.RecordingTelemetrySinkโ Class.pap.telemetryin memory: every event, in order.REFRESH_TOKEN_GRANTโ Constant. PublicREFRESH_TOKEN_GRANTconstant.resolve_pairwise_user_idโ Function. Resolve the active Reactor store and return its stable pairwise ID.ResolvingTransportโ Class. Every request to an untrusted host resolved, vetted, and pinned.RETRY_POLICIESโ Constant. PublicRETRY_POLICIESconstant.RetryPolicyโ Class. When to retry a refused request (Guides, retries).SessionAssertionClaimsโ Class. Claims signed by the personal agent when starting or renewing a session.SessionClientโ Class. Start and renew signed-out PAP sessions over the OAuth token endpoint.SessionErrorโ Class. A session request failed without exposing response secrets.SessionGrantโ Class. Redacted form values for a PAP JWT-bearer session request.SessionTokenโ Class. Opaque token response returned by a PAP company.SharedRateLimitBudgetโ Class. Defaultpap.rateLimitBudget: per-company budgets in one process.Signerโ Class. Sign a compact assertion without exposing private key material.SIGNERSโ Constant. PublicSIGNERSconstant.SqlitePairwiseUserIdStoreโ Class. Atomically persist random pairwise IDs in a local SQLite database.STANDING_PERMISSION_STORESโ Constant. PublicSTANDING_PERMISSION_STORESconstant.StandingPermissionโ Class. What the user allowed in advance: one company, account, and action.StandingPermissionRequestโ Class. PublicStandingPermissionRequestclass.StandingPermissionStoreโ Class. Reserve, commit, and release uses of standing permissions.StreamItemโ Constant. PublicStreamItemconstant.StreamReconnectedโ Class. The stream was reopened fromLast-Event-ID.SystemClockโ Class. Default UTC wall clock.SystemRandomSourceโ Class. Default operating-system cryptographic randomness.TELEMETRY_ATTRIBUTESโ Constant. PublicTELEMETRY_ATTRIBUTESconstant.TELEMETRY_EVENTSโ Constant. PublicTELEMETRY_EVENTSconstant.TELEMETRY_SINKSโ Constant. PublicTELEMETRY_SINKSconstant.TelemetryEventโ Class. One finished protocol stage: a span for traces, an event for analytics.TelemetrySinkโ Class. Receive each finished protocol stage (telemetry.TelemetryEvent), redacted already.TermLimitโ Class. A bound on one term, named by its dotted path interms.terms_digestโ Function. A digest of exactly what a revision says: its summary and its terms.TextDeltaโ Class. A piece of a message still being written (SSEtext-delta, ยง7.6).TOKEN_STORESโ Constant. PublicTOKEN_STORESconstant.TokenStoreโ Class. Keep credentials behind opaque references and explicit deletion.TransportErrorโ Class. An authenticated PAP resource request failed safely.URL_SAFETY_POLICIESโ Constant. PublicURL_SAFETY_POLICIESconstant.UserApprovalโ Class. The user approved this revision, as it was shown to them.validate_direct_sign_in_callbackโ Function. Validate redirect location, state, and issuer before exposing the code.VerifiedBrowserAssertionโ Class. PublicVerifiedBrowserAssertionclass.VerifiedDpopProofโ Class. Safe identity of a verified, newly accepted DPoP proof.verify_browser_assertionโ Function. Verify type, signature, bindings, lifetime, return target, and replay.verify_dpop_proofโ Function. Verify signature, binding, freshness, nonce, token hash, and replay state.