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

dtypes

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package dtypes contains shared types for the detection package and its sub-packages. It is intentionally minimal to avoid import cycles: both session/detection and session/detection/binaries import from here; neither imports the other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryDetector

type BinaryDetector interface {
	Name() string
	Patterns() StatusPatterns
	FilterContent(content string) string
}

BinaryDetector provides per-binary pattern sets and optional content filtering.

type OSCStatus added in v1.49.0

type OSCStatus int

OSCStatus represents the classification of a Claude Code OSC window-title payload (see session/detection/binaries.ClassifyOSCTitle), independent of and prior to mapping into a DetectedStatus/IdleState by the caller.

const (
	OSCStatusNone      OSCStatus = iota // no recognizable spinner/idle marker
	OSCStatusExecuting                  // Braille spinner (U+2800-U+28FF) present
	OSCStatusIdle                       // ✳ (U+2733) present
)

type StatusPattern

type StatusPattern struct {
	Name        string `yaml:"name"`
	Pattern     string `yaml:"pattern"`
	Description string `yaml:"description"`
	Priority    int    `yaml:"priority"` // Higher priority patterns checked first
}

StatusPattern represents a regex pattern for detecting a specific status.

type StatusPatterns

type StatusPatterns struct {
	Ready           []StatusPattern `yaml:"ready"`
	Processing      []StatusPattern `yaml:"processing"`
	NeedsApproval   []StatusPattern `yaml:"needs_approval"`
	InputRequired   []StatusPattern `yaml:"input_required"` // Explicit input prompts
	Error           []StatusPattern `yaml:"error"`
	TestsFailing    []StatusPattern `yaml:"tests_failing"`     // Tests are failing
	Idle            []StatusPattern `yaml:"idle"`              // Waiting for user input
	Active          []StatusPattern `yaml:"active"`            // Actively executing commands
	Success         []StatusPattern `yaml:"success"`           // Task completed successfully
	WaitingForAgent []StatusPattern `yaml:"waiting_for_agent"` // Waiting for background agent(s)
	Compacting      []StatusPattern `yaml:"compacting"`        // Actively compacting/summarizing conversation history
}

StatusPatterns contains all patterns for status detection.

Jump to

Keyboard shortcuts

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