Documentation
¶
Overview ¶
Package core contains the shared observe → reason → record cycle logic used by both the HTTP server (main.go) and the Lambda handler (cmd/lambda/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CycleResult ¶
type CycleResult struct {
DecisionID string `json:"decisionId"`
ActionType string `json:"actionType"`
Confidence float64 `json:"confidence"`
Situation string `json:"situation"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
}
CycleResult summarizes the outcome of one observe-reason-record cycle.
func RunObserveReasonCycle ¶
func RunObserveReasonCycle(ctx context.Context, mcpClient *mcp.Client, skillLoader *skills.Loader, store *decisions.Store, orchestratorURL string, monitor *monitoring.Monitor) CycleResult
RunObserveReasonCycle executes the observe → consult → reason → record loop. Returns a CycleResult summarizing the outcome. If monitor is non-nil, publishes CloudWatch metrics at the end of each cycle.
type ExecuteRequest ¶
type ExecuteRequest struct {
DecisionID string `json:"decisionId"`
ActionType string `json:"actionType"`
}
ExecuteRequest is the payload for the POST /execute safety gate.
type ReasonRequest ¶
type ReasonRequest struct {
MCPContext map[string]interface{} `json:"mcpContext"`
RelevantSkills []SkillPayload `json:"relevantSkills"`
Situation string `json:"situation"`
}
ReasonRequest is the payload sent to node-orchestrator's POST /reason.
type ReasonResponse ¶
type ReasonResponse struct {
ActionType string `json:"actionType"`
ReasoningText string `json:"reasoningText"`
Embedding []float32 `json:"embedding"`
Confidence float64 `json:"confidence"`
CcloudCommand *string `json:"ccloudCommand"`
}
ReasonResponse is the structured decision returned by POST /reason.
func CallReasonEndpoint ¶
func CallReasonEndpoint(orchestratorURL string, reqPayload ReasonRequest) (*ReasonResponse, error)
CallReasonEndpoint sends the cluster state & skills to node-orchestrator's /reason route.
type SkillPayload ¶
SkillPayload represents a skill sent to the reasoning endpoint.