app

package
v0.10.238 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package app assembles command-independent review runtime dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterFactory

type AdapterFactory func(config.LLMConfig, credentials.Reader) (llm.Adapter, error)

AdapterFactory builds an LLM adapter from normalized config and credentials.

type Dependencies

type Dependencies struct {
	NewGitProvider         GitProviderFactory
	ResolvePostingIdentity PostingIdentityResolver
	NewAdapter             AdapterFactory
	RuntimeLayout          func() (statepaths.Layout, error)
	OpenLedger             func(context.Context, string) (*ledger.Store, error)
	NewLimiter             func() (outbox.Limiter, error)
}

Dependencies contains fakeable assembly seams. Nil fields use production defaults.

type GitProviderFactory

GitProviderFactory builds a provider and the credential used to authenticate it.

type OpenRequest

type OpenRequest struct {
	Config                            config.File
	Profile                           config.Profile
	Backend                           string
	BackendFlagChanged                bool
	Command                           string
	Progress                          *progress.Logger
	Warnings                          io.Writer
	PRRef                             gitprovider.PRRef
	RequireOpinionatedReviewAuthority bool
	MaxAgents                         int
	MaxConcurrency                    int
	Retention                         datalifecycle.RetentionPolicy
	RetentionManualOnly               bool
	ResolveRepoRoot                   func(context.Context) (string, error)
	GitCommand                        func(context.Context, string, ...string) ([]byte, error)
	Dependencies                      Dependencies
}

OpenRequest carries command-resolved values needed to assemble a runtime.

type PostingIdentityResolver

PostingIdentityResolver resolves the identity used for live review writes.

type ResponseRunner

type ResponseRunner interface {
	Respond(context.Context, threadrespond.Request) (threadrespond.Result, error)
}

ResponseRunner executes response-only thread lifecycle runs.

type Runner

Runner executes the configured review pipeline.

type Runtime

type Runtime struct {
	Runner          Runner
	Responder       ResponseRunner
	PostingIdentity gitprovider.Identity
	Cleanup         func()
}

Runtime contains reusable runtime dependencies that need cleanup after a run.

func Open

func Open(ctx context.Context, req OpenRequest) (Runtime, error)

Open builds the concrete runtime used by review lifecycle commands.

type SelectionOpenRequest

type SelectionOpenRequest struct {
	Config             config.File
	Profile            config.Profile
	Backend            string
	BackendFlagChanged bool
	PRRef              gitprovider.PRRef
	Dependencies       Dependencies
}

SelectionOpenRequest carries command-resolved values for selection-only runtime assembly.

type SelectionRuntime

type SelectionRuntime struct {
	Provider gitprovider.GitProvider
	Adapter  llm.Adapter
	Cleanup  func()
}

SelectionRuntime contains the dependencies needed for selection-only execution paths that must match review-command runtime semantics.

func OpenSelection

func OpenSelection(ctx context.Context, req SelectionOpenRequest) (SelectionRuntime, error)

OpenSelection resolves provider and adapter setup using the same semantics as the real review command.

Jump to

Keyboard shortcuts

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