Documentation
¶
Overview ¶
Package decision defines the Decision record: every non-trivial choice the agent makes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct {
Type QuestionType `json:"type"`
Refused bool `json:"refused,omitempty"`
Probability float64 `json:"probability,omitempty"` // predicate: chance the statement is true
Choice string `json:"choice,omitempty"`
Score float64 `json:"score,omitempty"` // score: probability-weighted level index
Probabilities map[string]float64 `json:"probabilities,omitempty"`
Confidence float64 `json:"confidence,omitempty"` // choice and score only
}
func (Answer) MarshalJSON ¶
MarshalJSON writes the fields that belong to the answer's type, keeping zeros: a predicate at probability 0 is an answer, not a missing value.
type Decision ¶
type Decision struct {
ID ulid.ULID
ParentID *ulid.ULID
At time.Time
PerceptID ulid.ULID
SetID string // question set or reflex that decided, e.g. "incoming_message@3"
Tier Tier
Provider string // "" for reflexes
Answers map[string]Answer
Action string
Reply string // what was said, on the decision that said it; "" otherwise
Gate Gate
Latency time.Duration
CostUSD float64
Outcome *Outcome
Affect json.RawMessage // nil until emotions exist (architecture §4.9)
}
type Outcome ¶
type Outcome struct {
Status OutcomeStatus `json:"status"`
Detail string `json:"detail,omitempty"`
At time.Time `json:"at"`
}
type OutcomeStatus ¶
type OutcomeStatus string
const ( OutcomeOK OutcomeStatus = "ok" OutcomeFailed OutcomeStatus = "failed" )
type QuestionType ¶
type QuestionType string
const ( QuestionPredicate QuestionType = "predicate" QuestionChoice QuestionType = "choice" QuestionScore QuestionType = "score" )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package questions loads question sets: versioned System 1 questions plus the thresholds the router uses, kept as data in decisions/*.yaml.
|
Package questions loads question sets: versioned System 1 questions plus the thresholds the router uses, kept as data in decisions/*.yaml. |