session

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package session defines session metadata constants and tool identifiers for parsers.

Index

Constants

View Source
const (
	// FrontmatterTitle is the YAML frontmatter key for the entry title.
	FrontmatterTitle = "title"
	// FrontmatterDate is the YAML frontmatter key for the entry date.
	FrontmatterDate = "date"
	// FrontmatterType is the YAML frontmatter key for the session type.
	FrontmatterType = "type"
	// FrontmatterOutcome is the YAML frontmatter key for the session outcome.
	FrontmatterOutcome = "outcome"
	// FrontmatterTopics is the YAML frontmatter key for the topics list.
	FrontmatterTopics = "topics"
	// FrontmatterTechnologies is the YAML frontmatter key for the technologies list.
	FrontmatterTechnologies = "technologies"
	// FrontmatterKeyFiles is the YAML frontmatter key for the key files list.
	FrontmatterKeyFiles = "key_files"
	// FrontmatterLocked is the YAML frontmatter key and journal state
	// marker for locked entries.
	FrontmatterLocked = "locked"
	// FrontmatterLockedLine is the full YAML line inserted into frontmatter
	// when a journal entry is locked.
	FrontmatterLockedLine = "locked: true  # managed by ctx"
	// Unlocked is the display label for unlocked entries.
	Unlocked = "unlocked"
)

YAML frontmatter field names used in journal entries.

View Source
const (
	FmKeyTime      = "time"
	FmKeyProject   = "project"
	FmKeyBranch    = "branch"
	FmKeyModel     = "model"
	FmKeyTokensIn  = "tokens_in"
	FmKeyTokensOut = "tokens_out"
	FmKeySessionID = "session_id"
)

YAML frontmatter field keys for journal export.

View Source
const (
	ToolInputFilePath    = "file_path"
	ToolInputCommand     = "command"
	ToolInputPattern     = "pattern"
	ToolInputURL         = "url"
	ToolInputQuery       = "query"
	ToolInputDescription = "description"
)

Claude Code tool input JSON keys for display formatting.

View Source
const (
	// IDUnknown is the fallback session ID when input lacks one.
	IDUnknown = "unknown"
	// IDSuffixSummary is appended to session IDs for summary messages.
	IDSuffixSummary = "-summary"
	// IDSuffixTopic is appended to session IDs for topic messages.
	IDSuffixTopic = "-topic"
	// PreviewMaxLen is the maximum character length for first-message previews.
	PreviewMaxLen = 100
	// TemplateName is the name used for Go text/template instances.
	TemplateName = "msg"
)

Session and template constants.

View Source
const (
	// ToolClaudeCode is the tool identifier for Claude Code sessions.
	ToolClaudeCode = "claude-code"
	// ToolMarkdown is the tool identifier for Markdown session files.
	ToolMarkdown = "markdown"
)

Tool identifiers for session parsers.

View Source
const (
	ToolRead      = "Read"
	ToolWrite     = "Write"
	ToolEdit      = "Edit"
	ToolBash      = "Bash"
	ToolGrep      = "Grep"
	ToolGlob      = "Glob"
	ToolWebFetch  = "WebFetch"
	ToolWebSearch = "WebSearch"
	ToolTask      = "Task"
)

Claude Code tool names used in session transcripts.

View Source
const (
	// DefaultSessionFilename is the fallback filename component when
	// sanitization produces an empty string.
	DefaultSessionFilename = "session"
)
View Source
const (
	// ToolDisplayMaxLen is the max length for tool parameter display before truncation.
	ToolDisplayMaxLen = 100
)

Tool display limits.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL