Documentation
¶
Index ¶
- func AllowedStepTypeStrings() []string
- func ExportToJSON(session *ThinkingSession, includeBranches bool) string
- func ExportToMarkdown(session *ThinkingSession, includeBranches bool) string
- func ExportToText(session *ThinkingSession, includeBranches bool) string
- type AddStepInput
- type AddStepOutput
- type Branch
- type BranchThinkingInput
- type BranchThinkingOutput
- type DeleteSessionInput
- type DeleteSessionOutput
- type ExportSessionInput
- type ExportSessionOutput
- type GetMetricsInput
- type GetMetricsOutput
- type ListSessionsInput
- type ListSessionsOutput
- type LogicalIssue
- type MemoryStore
- func (s *MemoryStore) AddStep(sessionID string, content string, stepType StepType, parentStep *int, ...) (*ThinkingStep, error)
- func (s *MemoryStore) AddStepToBranch(sessionID, branchID string, content string, stepType StepType, parentStep *int, ...) (*ThinkingStep, error)
- func (s *MemoryStore) CreateBranch(sessionID string, fromStep int, alternativeDesc string) (*Branch, error)
- func (s *MemoryStore) CreateSession(problem string, context map[string]any, tags []string) (*ThinkingSession, error)
- func (s *MemoryStore) DeleteSession(id string) error
- func (s *MemoryStore) GetMetrics(timeRange string) SessionMetrics
- func (s *MemoryStore) GetSession(id string) (*ThinkingSession, error)
- func (s *MemoryStore) ListSessions() []*ThinkingSession
- func (s *MemoryStore) UpdateSessionStatus(id, status string) error
- func (s *MemoryStore) UpdateStep(sessionID string, stepNumber int, content *string, stepType *StepType, ...) (*ThinkingStep, error)
- type MergeInsightsInput
- type MergeInsightsOutput
- type ReviewThinkingInput
- type ReviewThinkingOutput
- type SessionMetrics
- type SessionSummary
- type StartFromTemplateInput
- type StartFromTemplateOutput
- type StartThinkingInput
- type StartThinkingOutput
- type StepType
- type Template
- type ThinkingPattern
- type ThinkingSession
- type ThinkingStep
- type UpdateStepInput
- type UpdateStepOutput
- type ValidateLogicInput
- type ValidateLogicOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedStepTypeStrings ¶
func AllowedStepTypeStrings() []string
AllowedStepTypeStrings returns the list of supported step types as strings.
func ExportToJSON ¶
func ExportToJSON(session *ThinkingSession, includeBranches bool) string
ExportToJSON exports a session to JSON format.
func ExportToMarkdown ¶
func ExportToMarkdown(session *ThinkingSession, includeBranches bool) string
ExportToMarkdown exports a session to markdown format.
func ExportToText ¶
func ExportToText(session *ThinkingSession, includeBranches bool) string
ExportToText exports a session to plain text format.
Types ¶
type AddStepInput ¶
type AddStepInput struct {
SessionID string `json:"session_id" jsonschema:"The session to add to"`
BranchID string `json:"branch_id,omitempty" jsonschema:"Branch identifier if adding to a branch"`
StepContent string `json:"step_content" jsonschema:"The reasoning for this step"`
StepType StepType `json:"step_type" jsonschema:"Type of reasoning step,enum=analysis,enum=hypothesis,enum=verification,enum=conclusion"`
ParentStep *int `json:"parent_step,omitempty" jsonschema:"Parent step number if building on previous step"`
Metadata map[string]any `json:"metadata,omitempty" jsonschema:"Additional metadata for the step"`
}
type AddStepOutput ¶
type AddStepOutput struct {
StepNumber int `json:"step_number" jsonschema:"The number of the added step"`
BranchID string `json:"branch_id,omitempty" jsonschema:"Branch identifier when the step belongs to a branch"`
CurrentProgress string `json:"current_progress" jsonschema:"Summary of thinking so far"`
SuggestedNextSteps []string `json:"suggested_next_steps" jsonschema:"Potential next steps"`
QualityScore float64 `json:"quality_score" jsonschema:"Current reasoning quality score"`
}
type Branch ¶
type Branch struct {
ID string `json:"id"`
FromStep int `json:"from_step"`
Steps []*ThinkingStep `json:"steps"`
Created time.Time `json:"created"`
AlternativeDesc string `json:"alternative_desc"`
}
Branch represents an alternative reasoning path
type BranchThinkingInput ¶
type BranchThinkingOutput ¶
type DeleteSessionInput ¶
type DeleteSessionInput struct {
SessionID string `json:"session_id" jsonschema:"The session to delete"`
}
type DeleteSessionOutput ¶
type ExportSessionInput ¶
type ExportSessionOutput ¶
type GetMetricsInput ¶
type GetMetricsInput struct {
TimeRange string `json:"time_range,omitempty" jsonschema:"Time range: day, week, month, all"`
}
type GetMetricsOutput ¶
type GetMetricsOutput struct {
Metrics SessionMetrics `json:"metrics" jsonschema:"Analytics and metrics for thinking sessions"`
}
type ListSessionsInput ¶
type ListSessionsOutput ¶
type ListSessionsOutput struct {
Sessions []SessionSummary `json:"sessions" jsonschema:"List of session summaries"`
Total int `json:"total" jsonschema:"Total number of matching sessions"`
}
type LogicalIssue ¶
type LogicalIssue struct {
StepNumber int `json:"step_number"`
IssueType string `json:"issue_type"`
Description string `json:"description"`
Severity string `json:"severity"`
Suggestion string `json:"suggestion"`
Examples []string `json:"examples,omitempty"`
}
LogicalIssue represents a potential problem in reasoning
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore provides in-memory storage for thinking sessions
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
NewMemoryStore creates a new in-memory store
func (*MemoryStore) AddStep ¶
func (s *MemoryStore) AddStep(sessionID string, content string, stepType StepType, parentStep *int, metadata map[string]any) (*ThinkingStep, error)
AddStep adds a step to a session
func (*MemoryStore) AddStepToBranch ¶
func (s *MemoryStore) AddStepToBranch(sessionID, branchID string, content string, stepType StepType, parentStep *int, metadata map[string]any) (*ThinkingStep, error)
AddStepToBranch adds a step to a specific branch
func (*MemoryStore) CreateBranch ¶
func (s *MemoryStore) CreateBranch(sessionID string, fromStep int, alternativeDesc string) (*Branch, error)
CreateBranch creates a new branch from a specific step
func (*MemoryStore) CreateSession ¶
func (s *MemoryStore) CreateSession(problem string, context map[string]any, tags []string) (*ThinkingSession, error)
CreateSession creates a new thinking session
func (*MemoryStore) DeleteSession ¶
func (s *MemoryStore) DeleteSession(id string) error
DeleteSession deletes a session
func (*MemoryStore) GetMetrics ¶
func (s *MemoryStore) GetMetrics(timeRange string) SessionMetrics
GetMetrics calculates metrics for all sessions
func (*MemoryStore) GetSession ¶
func (s *MemoryStore) GetSession(id string) (*ThinkingSession, error)
GetSession retrieves a session by ID
func (*MemoryStore) ListSessions ¶
func (s *MemoryStore) ListSessions() []*ThinkingSession
ListSessions returns all sessions
func (*MemoryStore) UpdateSessionStatus ¶
func (s *MemoryStore) UpdateSessionStatus(id, status string) error
UpdateSessionStatus updates the status of a session
func (*MemoryStore) UpdateStep ¶
func (s *MemoryStore) UpdateStep(sessionID string, stepNumber int, content *string, stepType *StepType, metadata map[string]any) (*ThinkingStep, error)
UpdateStep updates an existing step's content, type, or metadata
type MergeInsightsInput ¶
type MergeInsightsOutput ¶
type MergeInsightsOutput struct {
Synthesis string `json:"synthesis" jsonschema:"Combined insights from all branches"`
Conflicts []string `json:"conflicts" jsonschema:"Contradictions found between branches"`
Confidence float64 `json:"confidence" jsonschema:"Overall confidence in the merged conclusion"`
Strengths []string `json:"strengths" jsonschema:"Strengths of the combined reasoning"`
}
type ReviewThinkingInput ¶
type ReviewThinkingOutput ¶
type ReviewThinkingOutput struct {
Steps []*ThinkingStep `json:"steps" jsonschema:"All thinking steps"`
Connections map[string][]int `json:"connections" jsonschema:"Relationships between steps"`
QualityScore float64 `json:"quality_score" jsonschema:"Assessment of reasoning quality"`
Summary string `json:"summary" jsonschema:"Overall summary of the thinking process"`
Branches map[string]*Branch `json:"branches,omitempty" jsonschema:"Alternative reasoning paths"`
Patterns []ThinkingPattern `json:"patterns,omitempty" jsonschema:"Detected reasoning patterns"`
}
type SessionMetrics ¶
type SessionMetrics struct {
TotalSessions int `json:"total_sessions"`
ActiveSessions int `json:"active_sessions"`
CompletedSessions int `json:"completed_sessions"`
AverageSteps float64 `json:"average_steps"`
AverageQuality float64 `json:"average_quality"`
CommonPatterns []ThinkingPattern `json:"common_patterns"`
CommonIssues map[string]int `json:"common_issues"`
StepTypeDistrib map[StepType]int `json:"step_type_distribution"`
AverageBranches float64 `json:"average_branches"`
SessionsByDay map[string]int `json:"sessions_by_day"`
TopTags map[string]int `json:"top_tags"`
}
SessionMetrics represents analytics for thinking sessions
type SessionSummary ¶
type SessionSummary struct {
ID string `json:"id"`
Problem string `json:"problem"`
StepCount int `json:"step_count"`
BranchCount int `json:"branch_count"`
Status string `json:"status"`
QualityScore float64 `json:"quality_score"`
Created time.Time `json:"created"`
LastModified time.Time `json:"last_modified"`
Tags []string `json:"tags,omitempty"`
}
type StartFromTemplateInput ¶ added in v1.1.0
type StartFromTemplateInput struct {
Template string `` /* 245-byte string literal not displayed */
Problem string `json:"problem,omitempty" jsonschema:"Optional problem statement overriding the template title"`
Context map[string]any `json:"context,omitempty" jsonschema:"Optional background information"`
Tags []string `json:"tags,omitempty" jsonschema:"Tags to categorize the session"`
}
type StartFromTemplateOutput ¶ added in v1.1.0
type StartFromTemplateOutput struct {
SessionID string `json:"session_id" jsonschema:"Unique identifier for the session"`
Template *Template `json:"template" jsonschema:"Template metadata used to initialize the session"`
InitialAnalysis string `json:"initial_analysis" jsonschema:"First thoughts generated for the session"`
SuggestedSteps []string `json:"suggested_steps" jsonschema:"Template-driven recommended next steps"`
}
type StartThinkingInput ¶
type StartThinkingOutput ¶
type Template ¶
type Template struct {
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
Steps []string `json:"steps"`
WhenToUse string `json:"when_to_use"`
Example string `json:"example,omitempty"`
}
Template represents a thinking framework template
type ThinkingPattern ¶
type ThinkingPattern struct {
Name string `json:"name"`
Frequency int `json:"frequency"`
Confidence float64 `json:"confidence"`
Description string `json:"description"`
}
ThinkingPattern represents a detected reasoning pattern
type ThinkingSession ¶
type ThinkingSession struct {
ID string `json:"id"`
Problem string `json:"problem"`
Context map[string]any `json:"context,omitempty"`
Steps []*ThinkingStep `json:"steps"`
Branches map[string]*Branch `json:"branches"`
Created time.Time `json:"created"`
LastModified time.Time `json:"last_modified"`
CurrentStep int `json:"current_step"`
QualityScore float64 `json:"quality_score"`
Status string `json:"status"`
Tags []string `json:"tags,omitempty"`
InitialAnalysis string `json:"initial_analysis"`
}
ThinkingSession represents a complete thinking session
type ThinkingStep ¶
type ThinkingStep struct {
Number int `json:"number"`
Type StepType `json:"type"`
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
ParentStep *int `json:"parent_step,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Connections []int `json:"connections,omitempty"`
}
ThinkingStep represents a single step in the reasoning process
type UpdateStepInput ¶
type UpdateStepInput struct {
SessionID string `json:"session_id" jsonschema:"The session containing the step"`
StepNumber int `json:"step_number" jsonschema:"The step number to update"`
StepContent *string `json:"step_content,omitempty" jsonschema:"Updated reasoning content"`
StepType *StepType `json:"step_type,omitempty" jsonschema:"Updated step type"`
Metadata map[string]any `json:"metadata,omitempty" jsonschema:"Replacement metadata for the step"`
}
type UpdateStepOutput ¶
type UpdateStepOutput struct {
StepNumber int `json:"step_number" jsonschema:"The number of the updated step"`
UpdatedStep *ThinkingStep `json:"updated_step" jsonschema:"The updated step details"`
CurrentProgress string `json:"current_progress" jsonschema:"Summary of thinking so far"`
SuggestedNextSteps []string `json:"suggested_next_steps" jsonschema:"Potential next steps"`
QualityScore float64 `json:"quality_score" jsonschema:"Current reasoning quality score"`
LastModified time.Time `json:"last_modified" jsonschema:"Timestamp when the session was last modified"`
MetadataChanged bool `json:"metadata_changed" jsonschema:"Whether metadata was replaced"`
TypeChanged bool `json:"type_changed" jsonschema:"Whether the step type was updated"`
ContentChanged bool `json:"content_changed" jsonschema:"Whether the step content was updated"`
}
type ValidateLogicInput ¶
type ValidateLogicOutput ¶
type ValidateLogicOutput struct {
Issues []LogicalIssue `json:"issues" jsonschema:"Logical problems found"`
Suggestions []string `json:"suggestions" jsonschema:"Recommendations for improvement"`
ValidityScore float64 `json:"validity_score" jsonschema:"Overall validity rating (0-1)"`
StrongPoints []string `json:"strong_points" jsonschema:"Well-reasoned aspects"`
OverallAssessment string `json:"overall_assessment" jsonschema:"Summary of logical quality"`
}