chats

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir is var/chats under the project root.

func Root

func Root() string

Root locates the 2dph project root (KB_ROOT, or walk up for var/ or .git).

func RunApply

func RunApply(args []string) int

func RunFacts

func RunFacts(args []string) int

func RunImport

func RunImport(args []string) int

func RunSyncLinkedIn

func RunSyncLinkedIn(args []string) int

func RunSyncTelegram

func RunSyncTelegram(args []string) int

Types

type ChatInfo

type ChatInfo struct {
	ID           string   `json:"id"`
	Platform     string   `json:"platform"`
	Name         string   `json:"name"`
	Participants []string `json:"participants"`
	Type         string   `json:"type"`
	MessageCount int      `json:"messageCount"`
	LastTS       string   `json:"lastTs,omitempty"`
}

type ExtractedFact

type ExtractedFact struct {
	ChatID    string `json:"chat_id"`
	ChatName  string `json:"chat_name"`
	Platform  string `json:"platform"`
	FactType  string `json:"fact_type"`
	Value     string `json:"value"`
	Source    string `json:"source"`
	MessageID string `json:"message_id"`
}

type GetHistoryResult

type GetHistoryResult struct {
	ID     int    `json:"id"`
	Sender string `json:"sender"`
	Date   string `json:"date"`
	Text   string `json:"text"`
	Media  string `json:"media,omitempty"`
	Out    bool   `json:"out,omitempty"`
}

type LinkedInMCPSource

type LinkedInMCPSource struct {
	// contains filtered or unexported fields
}

func NewLinkedInMCPSource

func NewLinkedInMCPSource(userDataDir string) *LinkedInMCPSource

func (*LinkedInMCPSource) Name

func (s *LinkedInMCPSource) Name() string

func (*LinkedInMCPSource) Sync

func (s *LinkedInMCPSource) Sync(ctx context.Context, outDir string, limit int) error

type ListChatsResult

type ListChatsResult struct {
	ChatID   int64  `json:"chat_id"`
	Title    string `json:"name"`
	Type     string `json:"type"`
	Username string `json:"username,omitempty"`
}

type MCPClient

type MCPClient struct {
	// contains filtered or unexported fields
}

func NewMCPClient

func NewMCPClient(ctx context.Context, apiID int, apiHash, phone, sessionString, mcpDir string) (*MCPClient, error)

func (*MCPClient) Close

func (c *MCPClient) Close() error

func (*MCPClient) GetHistory

func (c *MCPClient) GetHistory(ctx context.Context, chatID int64, limit int) ([]GetHistoryResult, error)

func (*MCPClient) ListChats

func (c *MCPClient) ListChats(ctx context.Context, chatType string, limit int) ([]ListChatsResult, error)

type Message

type Message struct {
	ID        string  `json:"id"`
	Timestamp string  `json:"ts"`
	From      string  `json:"from"`
	Text      string  `json:"text"`
	Media     *string `json:"media,omitempty"`
	Platform  string  `json:"platform"`
}

type Source

type Source interface {
	Name() string
	Sync(ctx context.Context, outDir string, limit int) error
}

type TelegramMCPSource

type TelegramMCPSource struct {
	// contains filtered or unexported fields
}

func NewTelegramMCPSource

func NewTelegramMCPSource(apiID int, apiHash, phone, sessionString, mcpDir string) *TelegramMCPSource

func (*TelegramMCPSource) Name

func (s *TelegramMCPSource) Name() string

func (*TelegramMCPSource) Sync

func (s *TelegramMCPSource) Sync(ctx context.Context, outDir string, limit int) error

Jump to

Keyboard shortcuts

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