bijux_cli/contracts/
diagnostics.rs1use std::collections::BTreeMap;
2
3use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
5use serde_json::Value;
6
7use super::command::CommandPath;
8use super::execution::ExecutionPolicy;
9
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
12pub struct DiagnosticRecord {
13 pub id: String,
15 pub severity: String,
17 pub message: String,
19 pub fields: BTreeMap<String, Value>,
21}
22
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
25pub struct InvocationEvent {
26 pub timestamp: String,
28 pub name: String,
30 pub payload: BTreeMap<String, Value>,
32}
33
34#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
36pub struct InvocationTrace {
37 pub invocation_id: String,
39 pub command: CommandPath,
41 pub policy: ExecutionPolicy,
43 pub events: Vec<InvocationEvent>,
45}
46
47#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
49pub struct MemorySummary {
50 pub status: String,
52 pub count: usize,
54 pub message: String,
56}
57
58#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
60pub struct MemoryKeyList {
61 pub status: String,
63 pub keys: Vec<String>,
65 pub count: usize,
67}
68
69#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
71pub struct RouteSourceMetadata {
72 pub segments: Vec<String>,
74 pub owner: String,
76 pub source: String,
78}
79
80#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
82pub struct AliasRewrite {
83 pub alias: Vec<String>,
85 pub canonical: Vec<String>,
87 pub source: String,
89}
90
91#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
93pub struct InspectReport {
94 pub status: String,
96 pub route_sources: Vec<RouteSourceMetadata>,
98 pub alias_rewrites: Vec<AliasRewrite>,
100}