activity

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 9 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 activity contains the pluggable "activator" strategies that keep a Teams session showing as Available: synthetic input (per-OS backends) and the Microsoft Graph preferred-presence strategy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessibilityTrusted

func AccessibilityTrusted() bool

AccessibilityTrusted is a no-op on Linux (always trusted).

func InputSupported

func InputSupported() bool

InputSupported reports whether this build has a working synthetic-input backend for the current OS.

Types

type Activator

type Activator interface {
	// Name is a short identifier used in status and logs.
	Name() string
	// Tick performs one activation pulse.
	Tick(ctx context.Context) error
	// Stop releases resources and reverts any externally-visible state.
	Stop(ctx context.Context) error
}

Activator is one strategy for keeping the session active.

Tick performs a single activation pulse and is called by the engine on the configured interval while the schedule is active. Stop is called when the schedule transitions to inactive (and on shutdown) so the activator can release any held resources — power assertions, virtual input devices, or a sticky Graph presence.

func NewDry

func NewDry(engine string, log *slog.Logger) Activator

NewDry returns a no-op activator that logs its intended actions.

func NewGraph

func NewGraph(client *graph.Client, cfg config.GraphConfig) Activator

NewGraph builds the Graph activator from a configured client and settings.

func NewInput

func NewInput(cfg config.InputConfig) (Activator, error)

NewInput builds the OS-native synthetic-input activator. It returns an error on platforms without a backend or when device/permission setup fails.

Jump to

Keyboard shortcuts

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