Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Public documentation language
run: |
if rg -n -i '\b(boundary|path|surface|authority|projection|lowering|flow|layer)\b' \
if rg -n -i '\b(boundary|path|surface|authority|projection|lowering|flow|layer|contracts?)\b' \
README.md relay \
--glob '*.md' --glob '*.mdx'; then
echo "Public documentation must name the API, queue, process, service, or request directly."
Expand Down
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ The package owns the Relay-specific work:
- finite startup and shutdown deadlines;
- redacted credentials and structured failures.

PocketStation Core continues to own capture, graph compilation, bounded
routing, recording, and Session lifecycle.
PocketStation Core continues to own capture, graph compilation, route queues,
recording, and Session lifecycle.

## Current limits

Expand Down
6 changes: 3 additions & 3 deletions relay/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pocketstation-relay"
version = "0.1.2"
version = "0.1.3"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand All @@ -26,7 +26,7 @@ workspace = true

[dependencies]
base64 = "0.22"
pocketstation = { version = "1.1.3", default-features = false }
pocketstation = { version = "1.1.6", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
str0m = "0.20"
Expand All @@ -35,4 +35,4 @@ tungstenite = { version = "0.29", features = ["native-tls"] }
url = "2"

[dev-dependencies]
pocketstation = { version = "1.1.3", default-features = false, features = ["conformance-fixtures"] }
pocketstation = { version = "1.1.6", default-features = false, features = ["conformance-fixtures"] }
22 changes: 11 additions & 11 deletions relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the `pocketstation::connector` lifecycle.

`pocketstation-relay` owns the client-side Opus, RTP, WebRTC, and Relay
signaling implementation. PocketStation Core continues to own graph
compilation, bounded delivery, lineage, recording, and transactional lifecycle.
compilation, route delivery, lineage, recording, and transactional lifecycle.

```text
application stem ──→ application AudioBus ──┐
Expand Down Expand Up @@ -33,7 +33,7 @@ PocketStation-operated service by default.

```rust,no_run
use pocketstation::connector::ConnectorSecret;
use pocketstation::{ApplicationSelector, EdgeContract, Session, Source};
use pocketstation::{ApplicationSelector, RouteSettings, Session, Source};
use pocketstation_relay::{RelayConnector, RelayRouteConfiguration};

# fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand All @@ -59,7 +59,7 @@ let application_endpoint = registered.declare(
"application",
)?
.connector_configuration()?,
EdgeContract::realtime_audio(),
RouteSettings::realtime_audio(),
)?;

let microphone_endpoint = registered.declare(
Expand All @@ -71,7 +71,7 @@ let microphone_endpoint = registered.declare(
"microphone",
)?
.connector_configuration()?,
EdgeContract::realtime_audio(),
RouteSettings::realtime_audio(),
)?;

application.send(application_endpoint)?;
Expand Down Expand Up @@ -126,14 +126,14 @@ All validation happens before media publication:
- the Relay URL must be an HTTP(S) origin accepted by the transport;
- Session, bus, and publisher-group identities are finite and non-empty;
- credentials remain inside `ConnectorSecret` and are redacted from `Debug`;
- ICE server and URL counts are bounded;
- ICE server and URL counts must remain within their configured maxima;
- the startup deadline is between 1 ms and 120 seconds.

## Runtime contract
## Runtime behavior

| Concern | Behavior |
|---|---|
| Input | bounded 48 kHz interleaved `f32` PCM |
| Input | 48 kHz interleaved `f32` PCM through a fixed-capacity route queue |
| Encoding | Opus outside the realtime capture callback |
| Publication | named WebRTC streams mapped to Relay `AudioBus` identities |
| Startup | one finite deadline across DNS, signaling, ICE, and DTLS |
Expand All @@ -149,7 +149,7 @@ Core controls the Connector lifecycle:
Session prepare
→ Connector validates and prepares provider state
→ Core opens the start gate atomically
→ connector workers publish bounded route input
→ connector workers publish accepted route input
→ Core requests drain or abort
→ workers join
→ Core records terminal outcomes
Expand All @@ -160,7 +160,7 @@ engine. Provider retry/reconnect behavior must remain finite and explicit.

## Inspect publication results

`RelayConnector` retains bounded publication receipts. A receipt key identifies
`RelayConnector` retains receipts up to its configured capacity. A receipt key identifies
the endpoint/route publication, and the final result reports stable outcome
state and unit-bearing statistics. Missing receipts are not interpreted as
success.
Expand Down Expand Up @@ -195,5 +195,5 @@ cargo package -p pocketstation-relay --locked
```

Published crate versions and tags are immutable. Connector changes must retain
Core conformance, Relay protocol compatibility, secret redaction, bounded
startup/shutdown behavior, and isolated package-consumer proof.
Core conformance, Relay protocol compatibility, secret redaction, startup and
shutdown deadlines, and isolated package-consumer proof.
10 changes: 10 additions & 0 deletions relay/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# PocketStation Relay connector release notes

## 0.1.3 — Clear route settings

Relay destinations now use the route settings and execution safety names from
PocketStation 1.1.6. Audio delivery, named bus publication, cancellation, and
shutdown behavior are unchanged.

```console
cargo update -p pocketstation -p pocketstation-relay
```

## 0.1.2 — Stop cancelled output before Relay sends it

When a person interrupts generated speech, stopping the provider task is not
Expand Down
6 changes: 3 additions & 3 deletions relay/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use pocketstation::connector::{
ConnectorRegistrationError, ConnectorRequirement, RegisteredConnector,
};
use pocketstation::graph::{
AudioCaps, ChannelLayout, ExecutionPartition, MediaCaps, Multiplicity, NodeDescriptor,
NodeTypeId, PortDirection, PortSpec, SafetyContract, SignalSpec,
AudioCaps, ChannelLayout, ExecutionPartition, ExecutionSafety, MediaCaps, Multiplicity,
NodeDescriptor, NodeTypeId, PortDirection, PortSpec, SignalSpec,
};
use pocketstation::{OperatorId, SampleFormat, Session};

Expand Down Expand Up @@ -122,7 +122,7 @@ pub fn relay_connector_manifest() -> Result<ConnectorManifest, RelayConnectorBui
vec![input],
Vec::new(),
ExecutionPartition::AsyncWorker,
SafetyContract::NetworkAllowed,
ExecutionSafety::NetworkAllowed,
true,
)
.map_err(|error| RelayConnectorBuildError::GraphContract(error.to_string()))?;
Expand Down
2 changes: 1 addition & 1 deletion relay/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ mod tests {
.declare(
session,
configuration,
pocketstation::EdgeContract::realtime_audio(),
pocketstation::RouteSettings::realtime_audio(),
)
.expect("relay endpoint declaration")
}
Expand Down
Loading