event

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package event defines the episodic record shared by capture and its sources.

These rows are high-volume and individually near-worthless; their value is entirely in aggregate. They are never written to markdown directly and are pruned on a retention window.

Index

Constants

View Source
const IncidentalSecs int64 = 8

IncidentalSecs: a focus session shorter than this is almost always incidental — tabbing through windows to get somewhere else. Kept in the raw table for completeness but excluded from rollups and routine mining.

Variables

This section is empty.

Functions

func Now

func Now() int64

Types

type Event

type Event struct {
	// ID is the rowid once persisted, zero before. Proposals cite these, so
	// every inference can be traced back to the observations behind it.
	ID    int64
	TS    int64
	Kind  Kind
	App   string
	Title string
	URL   string
	Path  string
	// DurS is how long this state persisted, filled in by the coalescer rather
	// than by the source.
	DurS int64
}

func (Event) Identity

func (e Event) Identity() Identity

type Identity

type Identity struct {
	Kind       Kind
	App, Title string
}

Identity is what makes two samples "the same state" for coalescing.

type Kind

type Kind string
const (
	Focus     Kind = "focus"
	URL       Kind = "url"
	File      Kind = "file"
	Commit    Kind = "commit"
	Calendar  Kind = "calendar"
	Clipboard Kind = "clipboard"
	Screen    Kind = "screen"
)

Jump to

Keyboard shortcuts

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