Help us shape the future of Go! Take the 2026 Go Developer Survey

activity

package
v0.19.11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package activity normalizes session-local work without owning its execution.

Index

Constants

View Source
const Channel = "orb:activity"

Variables

This section is empty.

Functions

func Extension

func Extension(factory ViewFactory) extensions.Factory

func Publisher

func Publisher(bus func() extensions.EventBus, sessionID, source string) func(Record)

Publisher fences delayed callbacks to their original session and gives each attachment its own ID namespace. The bus resolver may follow an extension reload.

Types

type Kind

type Kind string
const (
	Agent   Kind = "agent"
	Process Kind = "process"
)

type Record

type Record struct {
	SessionID string
	Source    string
	ID        string
	Kind      Kind
	Title     string
	Detail    string
	State     State
	Sequence  uint64
	Started   time.Time
	Updated   time.Time
}

Record is a full observation, not a patch. IDs belong to the publisher, not tool rows.

type State

type State string
const (
	Queued    State = "queued"
	Running   State = "running"
	Waiting   State = "waiting"
	Completed State = "completed"
	Failed    State = "failed"
	Cancelled State = "cancelled"
	Unknown   State = "unknown"
)

func (State) Terminal

func (s State) Terminal() bool

type Store

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

func NewStore

func NewStore(sessionID string) *Store

func (*Store) Apply

func (s *Store) Apply(record Record) bool

func (*Store) ClearCompleted

func (s *Store) ClearCompleted()

func (*Store) Snapshot

func (s *Store) Snapshot() []Record

type View

type View interface {
	extensions.Component
	Control(string) error
}

View is supplied by the presentation assembly; the activity module stays headless.

type ViewFactory

type ViewFactory func(*Store, extensions.UIHost, extensions.Theme) View

Jump to

Keyboard shortcuts

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