mod dossier;
mod graph;
mod inbox;
mod overview;
mod schema;
mod timeline;
pub use dossier::{
AttemptView, FrameEnvironment, HandlerTriggerView, SourceLocation, StepDossierView,
VerdictRecordView, locate_step, step_dossier,
};
pub use graph::{
AssertionSummary, FlowGraphView, GraphEdge, GraphEdgeKind, GraphNode, GraphNodeBody, HookBadge,
NodeRegion, flow_graph_view,
};
pub use inbox::{HumanInboxEntry, human_inbox, run_inbox};
pub use overview::{AlignmentSummary, RunOverview, StepStateSummary, run_overview};
pub use schema::{
PROJECTION_SCHEMA_FAMILIES, ProjectionSchemaFamily, projection_schema, projection_schemas,
};
pub use timeline::{
BoundedValue, RunTimelineEntry, RunTimelineFilter, TIMELINE_EVIDENCE_MAX,
TIMELINE_JSON_MAX_BYTES, TIMELINE_JSON_MAX_DEPTH, TIMELINE_MAX_PAGE_SIZE,
TIMELINE_TEXT_MAX_BYTES, TimelineDetail, TimelineErrorView, TimelineEvidenceRef, TimelinePage,
timeline_page,
};
use schemars::{JsonSchema, Schema, SchemaGenerator, json_schema};
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct ProjectionVersion;
impl ProjectionVersion {
pub const VALUE: u64 = 1;
}
impl Serialize for ProjectionVersion {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
serializer.serialize_u64(Self::VALUE)
}
}
impl<'de> Deserialize<'de> for ProjectionVersion {
fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
let value = u64::deserialize(deserializer)?;
if value == Self::VALUE {
Ok(ProjectionVersion)
} else {
Err(serde::de::Error::custom(format!(
"unsupported projectionVersion {value}: this crate implements projectionVersion {}",
Self::VALUE
)))
}
}
}
impl JsonSchema for ProjectionVersion {
fn inline_schema() -> bool {
true
}
fn schema_name() -> Cow<'static, str> {
Cow::Borrowed("ProjectionVersion")
}
fn schema_id() -> Cow<'static, str> {
Cow::Borrowed("pointlock_store::projection::ProjectionVersion")
}
fn json_schema(_generator: &mut SchemaGenerator) -> Schema {
json_schema!({ "const": 1 })
}
}