activitystore

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package activitystore persists agent activity across Sidecar restarts.

Without it every launch rebuilds its trackers from nothing, so the first observation of an already-idle session is treated as initialization: ages all read "just now" and a turn that finished while Sidecar was closed can never surface as done. Persisting the idle transition keeps both facts true across restarts.

Index

Constants

View Source
const FileName = "agent-activity.json"

FileName is the store's basename inside the Sidecar state directory.

View Source
const RetainFor = 7 * 24 * time.Hour

RetainFor bounds how long an untouched entry survives. Workspaces come and go; without pruning the file would accumulate every shell ever observed.

Variables

This section is empty.

Functions

func Load

func Load(path string, now time.Time) map[string]agentactivity.Tracker

Load reads persisted trackers. A missing or unreadable store is not an error: activity state is a convenience, and losing it costs one poll cycle.

Only idle state is restored. A persisted working/blocked state would be re-detected within a poll anyway, and restoring it risks manufacturing a false completion when the pane's process was replaced while Sidecar was down.

func Save

func Save(path string, trackers map[string]agentactivity.Tracker, now time.Time) error

Save writes the given trackers, replacing the file atomically so a crash mid-write cannot leave a half-parsed store behind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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