README

vectie/moonfish/routine does not have a README file

#
ModelStage

pub(all) enum ModelStage {
Stage1
Stage2
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
ModelUsage

pub(all) struct ModelUsage {
prompt_tokens : Int
completion_tokens : Int
total_tokens : Int
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
RoutineEvent

pub(all) struct RoutineEvent {
run_id : String
index : Int
phase : RoutinePhase
kind : RoutineEventKind
message : String
at_ms : Int64
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
RoutineEventKind

pub(all) enum RoutineEventKind {
PhaseStarted
PhaseCompleted
ToolPlanned
ModelOutputCaptured
ValidationCaptured
RecordPersisted
RoutineCancelled
RoutineFailed
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
RoutinePhase

pub(all) enum RoutinePhase {
CreateRunContext
SnapshotMarketData
Stage1Diagnosis
Stage1Validation
StrategyRouting
Stage2Decision
Stage2Validation
PersistAnalysis
FollowUpReady
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
RoutinePhase::label

fn RoutinePhase::label(self : RoutinePhase) -> String

#
RoutinePlan

pub(all) struct RoutinePlan {
run_id : String
phases : Array[RoutinePhase]
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
RoutineRequest

pub(all) struct RoutineRequest {
run_id : String
operator_request : String
snapshot :
KlineSnapshot

} derive(Eq, ToJson,
Debug
,
FromJson
)

#
StageOutput

pub(all) struct StageOutput {
stage : ModelStage
content : String
reasoning_content : String?
usage : ModelUsage?
} derive(Eq, ToJson,
Debug
,
FromJson
)

#
append_event

fn append_event(events : Array[RoutineEvent], event : RoutineEvent) -> Array[RoutineEvent]

#
default_phases

fn default_phases() -> Array[RoutinePhase]

#
model_usage

fn model_usage(prompt_tokens : Int, completion_tokens : Int) -> ModelUsage

#
phase_events

fn phase_events(run_id : String, phases : Array[RoutinePhase], start_index? : Int) -> Array[RoutineEvent]

#
routine_event

fn routine_event(run_id : String, index : Int, phase : RoutinePhase, kind : RoutineEventKind, message : String, at_ms? : Int64) -> RoutineEvent

#
routine_plan

fn routine_plan(run_id : String) -> RoutinePlan

#
routine_request

fn routine_request(run_id : String, operator_request : String, snapshot :
KlineSnapshot
) -> RoutineRequest

#
stage_output

fn stage_output(stage : ModelStage, content : String, reasoning_content : String?, usage : ModelUsage?) -> StageOutput