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
67 changes: 41 additions & 26 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion crates/akroasis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ figment = { workspace = true }
indicatif = "0.17"
jiff = { workspace = true }
kerykeion = { path = "../kerykeion" }
koinon = { path = "../koinon" }
stoicheion = { path = "../stoicheion" }
tekmerion = { path = "../tekmerion" }
kryphos = { path = "../kryphos" }
rpassword = { workspace = true }
serde = { workspace = true }
Expand Down
13 changes: 7 additions & 6 deletions crates/akroasis/src/caller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

use std::fmt;

use koinon::{
use snafu::{ResultExt, Snafu};
use stoicheion::Timestamp;
use tekmerion::{
AuthorizationDenial, AuthorizationRequirement, CALLER_RESOLVER_VERSION, CallerAuthority,
CallerContractError, CallerRef, CallerResolver, EffectDescriptor, EffectOutcome, EffectReceipt,
EffectReceiptError, EffectReceiptSink, EvidenceDigest, LocalPeerCredentials, PersistedIntent,
PersistedOutcome, ReceiptDigest, RecoveryAuthorization, RecoveryTicket, RevocationState,
Timestamp, ValidatedCaller, authorize_caller,
ValidatedCaller, authorize_caller,
};
use snafu::{ResultExt, Snafu};
use tokio::net::UnixStream;

/// Version of accepted service-identity evidence.
Expand Down Expand Up @@ -423,19 +424,19 @@ where

const fn outcome_needs_recovery(
outcome: EffectOutcome,
recovery: koinon::RecoveryRelation,
recovery: tekmerion::RecoveryRelation,
) -> bool {
matches!(
(outcome, recovery),
(
EffectOutcome::Partial | EffectOutcome::RecoveryRequired,
koinon::RecoveryRelation::RequiredFor(_)
tekmerion::RecoveryRelation::RequiredFor(_)
) | (
EffectOutcome::Failed
| EffectOutcome::Cancelled
| EffectOutcome::Backpressured
| EffectOutcome::AuthorizationDenied,
koinon::RecoveryRelation::RecoveryOf(_)
tekmerion::RecoveryRelation::RecoveryOf(_)
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/caller_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use std::cell::Cell;
use std::rc::Rc;

use koinon::{
use tekmerion::{
AuthorityClaims, AuthorityDecision, AuthorityGrant, AuthorizationDenial,
AuthorizationRequirement, CALLER_CONTEXT_VERSION, CallerContractError, CapabilityRef,
PersonaRef, PolicyEpoch, PrincipalSource, ScopeRef, authorize_caller,
Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/radio/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ fn csv_escape(s: &str) -> String {
reason = "test code: panics and unwraps acceptable in assertions"
)]
mod tests {
use koinon::Frequency;
use stoicheion::Frequency;
use syntonia::tone::CtcssTone;
use syntonia::types::FrequencyOffset;

Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/radio/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use std::io::Write;
use std::path::Path;

use koinon::Frequency;
use serde::Serialize;
use snafu::ResultExt;
use stoicheion::Frequency;
use syntonia::{Bandwidth, Channel, FrequencyPlan, PowerLevel, ScanMode, ToneMode};

use super::errors::{IoSnafu, JsonReportSnafu, RadioError, ReadFileSnafu, SyntoniaSnafu};
Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/radio/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub(crate) fn load_plan(path: &Path) -> Result<FrequencyPlan, RadioError> {
reason = "test code: panics and unwraps acceptable in assertions"
)]
mod tests {
use koinon::Frequency;
use stoicheion::Frequency;
use syntonia::{Bandwidth, Channel, PowerLevel, ScanMode, ToneMode, types::FrequencyOffset};

use super::*;
Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/radio/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const fn format_scan(scan: ScanMode) -> &'static str {
reason = "test code: panics and unwraps acceptable in assertions"
)]
mod tests {
use koinon::Frequency;
use stoicheion::Frequency;
use syntonia::tone::CtcssTone;
use syntonia::types::FrequencyOffset;

Expand Down
2 changes: 1 addition & 1 deletion crates/akroasis/src/radio/serial_hardware.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Feature-gated live serial radio detection and protocol session backend.

use koinon::RadioKind;
use stoicheion::RadioKind;
use syntonia::baofeng::{
codec::{CodecError, decode_all_channels, encode_all_channels},
image::MemoryImage,
Expand Down
10 changes: 3 additions & 7 deletions crates/akroasis/tests/caller_architecture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ fn restricted_identifiers(source: &str) -> BTreeSet<String> {
#[test]
fn caller_construction_aliases_are_detected() {
let source = r"
use koinon::{
AuthorityClaimsBuilder as Claims,
CallerAuthority as Authority,
CallerResolver as Resolver,
};
use tekmerion::{AuthorityClaimsBuilder as Claims, CallerAuthority as Authority, CallerResolver as Resolver};

fn bypass<A: Authority>(authority: A) {
let _claims = Claims::new();
Expand Down Expand Up @@ -166,8 +162,8 @@ fn is_allowed(path: &Path) -> bool {
|| path == Path::new("crates/akroasis/tests/caller_contract.rs")
|| path == Path::new("crates/akroasis/tests/caller_recovery.rs")
|| path == Path::new("crates/akroasis/tests/caller_receipt_wire.rs")
|| path == Path::new("crates/koinon/src/caller.rs")
|| path == Path::new("crates/koinon/src/lib.rs")
|| path == Path::new("crates/tekmerion/src/caller.rs")
|| path == Path::new("crates/tekmerion/src/lib.rs")
}

fn collect_rust_files(path: &Path, files: &mut Vec<PathBuf>) {
Expand Down
9 changes: 5 additions & 4 deletions crates/akroasis/tests/caller_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ use akroasis_lib::caller::{
AdmissionDecision, ApplicationCallerError, ApplicationCallerResolver, EffectExecution,
EffectGateError, EffectRequest, TrustedClock, execute_effect,
};
use koinon::{
use snafu::Snafu;
use stoicheion::Timestamp;
use tekmerion::{
AuthorityClaims, AuthorityDecision, AuthorityGrant, AuthorizationDenial,
AuthorizationRequirement, CALLER_CONTEXT_VERSION, CALLER_RESOLVER_VERSION, CallerAuthority,
CallerContractError, CallerRef, CapabilityRef, EffectDescriptor, EffectOutcome, EffectReceipt,
EffectReceiptError, EffectReceiptSink, EffectRef, LocalPeerCredentials, PersonaRef,
PolicyEpoch, ReceiptDigest, ReceiptEvent, SchemaEpoch, ScopeRef, Timestamp,
PolicyEpoch, ReceiptDigest, ReceiptEvent, SchemaEpoch, ScopeRef,
};
use snafu::Snafu;
use tokio::net::UnixStream;

#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -296,7 +297,7 @@ fn standard_grant() -> AuthorityGrant {
)
}

fn valid_caller() -> koinon::ValidatedCaller {
fn valid_caller() -> tekmerion::ValidatedCaller {
let authority = FakeAuthority::granted(standard_grant(), policy_epoch(7));
let resolver = ApplicationCallerResolver::current(authority).expect("current resolver");
let (client, _server) = UnixStream::pair().expect("Unix socket pair");
Expand Down
6 changes: 3 additions & 3 deletions crates/akroasis/tests/caller_receipt_wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use akroasis_lib::caller::{
AdmissionDecision, ApplicationCallerResolver, EffectExecution, EffectRequest, TrustedClock,
execute_effect,
};
use koinon::{
use snafu::Snafu;
use stoicheion::Timestamp;
use tekmerion::{
AuthorityClaims, AuthorityDecision, AuthorityGrant, AuthorizationRequirement,
CALLER_CONTEXT_VERSION, CallerAuthority, CallerRef, CapabilityRef, EffectDescriptor,
EffectReceipt, EffectReceiptError, EffectReceiptSink, EffectRef, EvidenceDigest,
LocalPeerCredentials, PolicyEpoch, ReceiptDigest, RecoveryRelation, SchemaEpoch, ScopeRef,
Timestamp,
};
use snafu::Snafu;
use tokio::net::UnixStream;

#[derive(Debug, Clone, Copy)]
Expand Down
9 changes: 5 additions & 4 deletions crates/akroasis/tests/caller_recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ use akroasis_lib::caller::{
AdmissionDecision, ApplicationCallerResolver, EffectExecution, EffectGateError, EffectRequest,
TrustedClock, execute_effect,
};
use koinon::{
use snafu::Snafu;
use stoicheion::Timestamp;
use tekmerion::{
AuthorityClaims, AuthorityDecision, AuthorityGrant, AuthorizationRequirement,
CALLER_CONTEXT_VERSION, CallerAuthority, CallerRef, CapabilityRef, EFFECT_RECEIPT_VERSION,
EffectDescriptor, EffectOutcome, EffectReceipt, EffectReceiptError, EffectReceiptSink,
EffectRef, LocalPeerCredentials, PersistedIntent, PersistedOutcome, PolicyEpoch, ReceiptDigest,
ReceiptEvent, RecoveryAuthorization, RecoveryRelation, SchemaEpoch, ScopeRef, Timestamp,
ReceiptEvent, RecoveryAuthorization, RecoveryRelation, SchemaEpoch, ScopeRef,
};
use snafu::Snafu;
use tokio::net::UnixStream;

#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -255,7 +256,7 @@ fn grant() -> AuthorityGrant {
)
}

fn caller() -> koinon::ValidatedCaller {
fn caller() -> tekmerion::ValidatedCaller {
let resolver = ApplicationCallerResolver::current(RecoveryAuthority { grant: grant() })
.expect("current caller resolver");
let (client, _server) = UnixStream::pair().expect("Unix socket pair");
Expand Down
2 changes: 1 addition & 1 deletion crates/kerykeion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
description = "Meshtastic mesh networking integration for Akroasis"

[dependencies]
koinon = { path = "../koinon" }
stoicheion = { path = "../stoicheion" }
serde = { workspace = true }
serde_json = { workspace = true }
snafu = { workspace = true }
Expand Down
7 changes: 5 additions & 2 deletions crates/kerykeion/src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use std::sync::Arc;
use std::time::Duration;

use koinon::GeoSignal;
use stoicheion::GeoSignal;
use tokio::sync::{Mutex, broadcast};
use tokio::task::JoinSet;
use tokio_util::sync::CancellationToken;
Expand Down Expand Up @@ -37,7 +37,10 @@ use crate::types::ClaimedNodeNum;
/// Trait for Akroasis data collectors.
///
/// Defines the minimal lifecycle interface shared across all collector crates.
/// This is a local definition pending the addition of `koinon::Collector`.
/// This is a local definition pending a shared one. Which crate it belongs in
/// is genuinely open: a collector produces signals, which is `stoicheion`'s
/// layer, but it is a pipeline role rather than an element, so it may belong
/// in neither. Left local until something forces the choice.
pub trait Collector: Send + Sync {
/// Returns the canonical name of this collector.
fn name(&self) -> &'static str;
Expand Down
2 changes: 1 addition & 1 deletion crates/kerykeion/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::time::Duration;

use koinon::GeoSignal;
use stoicheion::GeoSignal;
use tokio::sync::broadcast;
use tokio_util::sync::CancellationToken;
use tracing::instrument;
Expand Down
Loading