polyc-web-session 2026.9.0

Browser session establishment (ADR 0007): one-time login challenges, the shared session cookie, and both the persona-passkey and wallet-passkey ceremonies that mint a polyc_crypto::session token. Consumed by polyc-control-plane; carries no ceremony-consumer naming of its own.
[package]
name = "polyc-web-session"
description = "Browser session establishment (ADR 0007): one-time login challenges, the shared session cookie, and both the persona-passkey and wallet-passkey ceremonies that mint a polyc_crypto::session token. Consumed by polyc-control-plane; carries no ceremony-consumer naming of its own."
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
rust-version.workspace = true
repository.workspace = true

[package.metadata.polychrome]
# Software-system layer — see docs/architecture/. A Component composed into
# Containers; depends inward only (never on a Container). Not `foundation`:
# it depends on polyc-persona, itself a Component.
layer = "component"
# Logical plane role in the separated state, projection, and query topology
# (#1565, chunk A1) — a different question than `layer` above. The canonical
# policy is arch-capabilities.toml; scripts/check_plane_capabilities.py checks it.
plane_role = "shared"

[dependencies]
polyc-crypto = { version = "=2026.9.0", path = "../crypto" }
polyc-proto = { version = "=2026.9.0", path = "../proto" }
polyc-persona = { version = "=2026.9.0", path = "../persona" }
polyc-passkey = { version = "=2026.9.0", path = "../passkey" }
# The durable store both ceremonies create a rotation family in, and the
# `ScopeRoot` they root it with. The dependency runs this way only: the store
# knows nothing about how a root was proven.
polyc-session-family = { version = "=2026.9.0", path = "../session-family" }
# Transport-free authority for durable one-time login challenges. This crate
# knows no State or Connect type; Control injects the production adapter.
polyc-ceremony = { version = "=2026.9.0", path = "../ceremony" }
# Stateless wallet-signature recovery for the wallet-passkey ceremony —
# `TempoSignature::from_bytes`/`recover_signer`, the same envelope shape
# `crates/wallet-delegation`'s conformance spike proves is byte-compatible
# with the browser SDK's `ox` output.
tempo-primitives = { workspace = true }
alloy-primitives = { workspace = true }
base64 = { workspace = true }
thiserror = { workspace = true }
uuid = { workspace = true }
# `WebAuthnLoginConfig::from_base_url` derives a login page's `WebAuthn`
# relying-party id + origin from its configured base URL.
url = "2"
# `wallet_login::test_util` (behind the `test-util` feature) assembles a
# `TempoSignature::WebAuthn` envelope by hand from `SoftPasskey`'s DER
# signature + SEC1 public key (DER -> raw r/s, SEC1 -> raw x/y) — the same
# P-256 primitives `polyc-passkey` itself uses internally. `optional`: real
# production code never constructs an envelope, only parses one the wallet
# SDK already produced, so this is a `dep:` activated by `test-util` alone,
# not a dependency of the crate's own default build.
p256 = { version = "0.14", optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tokio-util = { workspace = true }
# Both ceremonies' own tests create a family against a live store via
# `family_host::test_util::spawn_families`. Unconditional, not forwarded from
# this crate's own `test-util` feature: these are ordinary `cargo nextest run
# -p polyc-web-session` tests, which pass no extra `--features`.
polyc-session-family = { path = "../session-family", features = ["test-util"] }
# `passkey_login`'s tests seed a persona credential to have something for a
# login assertion to verify against; the write itself is test-only in
# `polyc-persona`, since no verified writer survives.
polyc-persona = { path = "../persona", features = ["test-util"] }
polyc-passkey = { path = "../passkey", features = ["test-util"] }
polyc-ceremony = { path = "../ceremony", features = ["test-util"] }
# Also a dev-dependency (in addition to the optional `test-util`-gated one
# above) so `cargo nextest run -p polyc-web-session` builds this crate's OWN
# tests with no extra `--features` flag, matching how every other crate in
# this workspace is run.
p256 = "0.14"

[features]
# Exposes `wallet_login::test_util` so other crates' own integration tests
# (`polyc-control-plane`'s HTTP-level tests) can assemble a real, byte-correct
# wallet-login envelope without duplicating this crate's wire-format
# knowledge — mirrors `polyc-passkey`'s own `test-util` feature shape.
test-util = ["dep:p256", "polyc-passkey/test-util", "polyc-ceremony/test-util"]

[lints]
workspace = true