sessionops

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStartingBranchRequiresSource = errors.New("starting branch requires source")

Functions

func BuildCreateSessionRequest

func BuildCreateSessionRequest(options CreateSessionRequestOptions) (*jules.CreateSessionRequest, error)

func DefaultWatchWakeReason

func DefaultWatchWakeReason(decision WatchDecision) string

func DocumentedOutputs

func DocumentedOutputs(session *jules.Session) []jules.Output

func HasJulesAgentMessageAfter

func HasJulesAgentMessageAfter(activities []jules.Activity, cursor time.Time) bool

func MCPNextAction

func MCPNextAction(snapshot WatchSnapshot) string

func NormalizeSourceID

func NormalizeSourceID(sourceID string) string

func SessionChangesSummary

func SessionChangesSummary(changes *julesops.SessionChanges) (string, int, int)

Types

type CreateSessionRequestOptions

type CreateSessionRequestOptions struct {
	Prompt              string
	Source              string
	NoSource            bool
	Title               string
	StartingBranch      string
	RequirePlanApproval bool
	AutomationMode      string
}

type CurrentWatchOptions

type CurrentWatchOptions struct {
	FetchActivities bool
}

type PatchPreparation

type PatchPreparation struct {
	DryRun         bool
	Options        *julesops.PatchApplicationOptions
	Blocker        string
	WorktreeStatus string
}

func PreparePatchApplication

func PreparePatchApplication(ctx context.Context, request PatchRequest) (*PatchPreparation, error)

type PatchRequest

type PatchRequest struct {
	WorkingDir        string
	DryRun            bool
	Confirm           bool
	AllowDirty        bool
	Force             bool
	CreateBackup      bool
	ActivityID        string
	ArtifactIndex     int
	HasArtifactIndex  bool
	AllowBaseMismatch bool
}

type StatusSummary

type StatusSummary struct {
	TotalSessions      int
	StateBreakdown     map[string]int
	ActiveSessions     int
	UserActionSessions int
	RecentSessions     []jules.Session
	Summary            string
}

func SummarizeSessions

func SummarizeSessions(sessions []jules.Session, recentLimit int) StatusSummary

type WatchDecision

type WatchDecision struct {
	Kind WatchDecisionKind
	Stop bool
}

func EvaluateWatchDecision

func EvaluateWatchDecision(session *jules.Session, hasDeliverables *bool, deliverablesErr error) WatchDecision

type WatchDecisionKind

type WatchDecisionKind string
const (
	WatchDecisionContinue                        WatchDecisionKind = "continue"
	WatchDecisionNeedsUserAction                 WatchDecisionKind = "needs_user_action"
	WatchDecisionFailed                          WatchDecisionKind = "failed"
	WatchDecisionCompletedDeliverableCheckFailed WatchDecisionKind = "completed_deliverable_check_failed"
	WatchDecisionCompletedNoDeliverables         WatchDecisionKind = "completed_no_deliverables"
	WatchDecisionCompletedWithDeliverables       WatchDecisionKind = "completed_with_deliverables"
	WatchDecisionOutputs                         WatchDecisionKind = "outputs"
)

type WatchSnapshot

type WatchSnapshot struct {
	Session              *jules.Session
	Activities           []jules.Activity
	ActivityError        error
	DeliverablesError    error
	NextCursor           time.Time
	HasJulesAgentMessage bool
	Decision             WatchDecision
}

func CurrentWatchSnapshot

func CurrentWatchSnapshot(ctx context.Context, client *jules.Client, sessionID string, cursor time.Time, options CurrentWatchOptions) (WatchSnapshot, error)

Jump to

Keyboard shortcuts

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