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 ¶
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 ¶
type GitProviderFactory func(config.GitConfig, credentials.Reader, githubprovider.Options) (gitprovider.GitProvider, gitprovider.Credential, error)
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 ¶
type PostingIdentityResolver func(context.Context, gitprovider.GitProvider, gitprovider.Credential, credentials.Reader, config.Profile) (gitprovider.Identity, error)
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 ¶
type Runner interface {
DryRun(context.Context, pipeline.Request) (pipeline.Result, error)
Live(context.Context, pipeline.Request, reviewrun.Flags) (reviewrun.Result, error)
}
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.
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.