agentctx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ChatProtocolV2 = "chat-v2"

Variables

This section is empty.

Functions

func BuildChatDir

func BuildChatDir(baseDir string) (string, error)

func BuildUniqueChatPath

func BuildUniqueChatPath(cwd, title string) (string, error)

func BuildUniqueChatPathForFileName

func BuildUniqueChatPathForFileName(baseDir, fileName string) (string, error)

func BuildUniqueChatPathInDir

func BuildUniqueChatPathInDir(chatDir, fileName string) (string, error)

func ChatProjectionFrontmatter

func ChatProjectionFrontmatter(file ChatProjectionFile) string

func DefaultConversationWorkdir

func DefaultConversationWorkdir(baseDir string) string

func EnsureChatProjectionFile

func EnsureChatProjectionFile(file ChatProjectionFile) error

func NormalizeChatFileName

func NormalizeChatFileName(fileName string) (string, error)

Types

type ChatFileMeta

type ChatFileMeta struct {
	ThreadID  string
	Protocol  string
	Title     string
	CreatedAt time.Time
	UpdatedAt time.Time
}

ChatFileMeta is the canonical metadata parsed from chat markdown frontmatter. It is used only for projection/index maintenance. Runtime session truth lives in session JSONL, not markdown.

func ReadChatFileMeta

func ReadChatFileMeta(path string) (*ChatFileMeta, error)

ReadChatFileMeta extracts metadata from YAML frontmatter (first --- block).

type ChatProjectionFile

type ChatProjectionFile struct {
	ThreadID       string
	Title          string
	ChatPath       string
	ParentThreadID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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