Documentation
¶
Overview ¶
Package mulgae parses the fixed Mulgae command line into immutable invocations.
Index ¶
- Variables
- type Application
- type Availability
- type CleanRequest
- type ConfigMode
- type ConfigRequest
- type DeltaRequest
- type DeltaRunService
- type Dependencies
- type DoctorRequest
- type ExcerptRequest
- type ExportRequest
- type FindingView
- type FindingsRequest
- type FindingsView
- type FollowupRequest
- type FollowupRunService
- type G008Composition
- type G008IdentityGenerator
- type G008OnlineAuthority
- type G008RequestResolver
- func (resolver *G008RequestResolver) CaptureTarget(ctx context.Context) (string, error)
- func (resolver *G008RequestResolver) Diagnostics() []string
- func (resolver *G008RequestResolver) ResolveAttempt(ctx context.Context, runSelector, roleSelector, provider string) (string, error)
- func (resolver *G008RequestResolver) ResolvePublicationRun(ctx context.Context, root ports.AnchoredRoot, runID domain.RunID) (ports.PublicationRun, error)
- func (resolver *G008RequestResolver) ResolveRun(ctx context.Context, selector string) (string, error)
- func (resolver *G008RequestResolver) TakeCapturedStdin(ctx context.Context, token string) ([]byte, error)
- type G008RunEnumerator
- type G008RunResolver
- type G008RuntimePromptSource
- func (source *G008RuntimePromptSource) DeltaPrompt(ctx context.Context, job review.InvocationJob, ...) (review.RuntimePrompt, error)
- func (source *G008RuntimePromptSource) ExactReplayPrompt(ctx context.Context, job review.InvocationJob, input review.ExactReplayInput) (review.RuntimePrompt, error)
- func (source *G008RuntimePromptSource) Prompt(ctx context.Context, job review.InvocationJob, ...) (review.RuntimePrompt, error)
- type G008Sources
- func (sources *G008Sources) ReadFollowupSource(ctx context.Context, runID domain.RunID, findingID string) (appfollowup.VerifiedSource, error)
- func (sources *G008Sources) ReadRerunSource(ctx context.Context, runID domain.RunID, attemptID domain.AttemptID) (apprerun.SourceAttempt, error)
- func (sources *G008Sources) ReadSource(ctx context.Context, runID domain.RunID) (appdelta.SourceSnapshot, error)
- type HelpRequest
- type InitRequest
- func (request InitRequest) AGYOverrides() (string, string)
- func (request InitRequest) ArtistInputs() (string, []string)
- func (request InitRequest) ContextPath() (string, bool)
- func (request InitRequest) KimiOverrides() (string, string, string)
- func (request InitRequest) NativeHome() (string, bool)
- func (request InitRequest) Overwrite() bool
- func (request InitRequest) ProjectKind() (string, bool)
- func (request InitRequest) ProjectName() string
- func (request InitRequest) ProjectRoot() string
- func (request InitRequest) Roles() []string
- func (request InitRequest) Selection() (string, []string)
- func (request InitRequest) ZCodeOverrides() (string, string)
- type Invocation
- func (invocation Invocation) Availability() Availability
- func (invocation Invocation) Clean() (CleanRequest, bool)
- func (invocation Invocation) Command() app.CommandName
- func (invocation Invocation) Config() (ConfigRequest, bool)
- func (invocation Invocation) Delta() (DeltaRequest, bool)
- func (invocation Invocation) Doctor() (DoctorRequest, bool)
- func (invocation Invocation) Excerpt() (ExcerptRequest, bool)
- func (invocation Invocation) Export() (ExportRequest, bool)
- func (invocation Invocation) Findings() (FindingsRequest, bool)
- func (invocation Invocation) Followup() (FollowupRequest, bool)
- func (invocation Invocation) FutureMilestone() bool
- func (invocation Invocation) Help() (HelpRequest, bool)
- func (invocation Invocation) Init() (InitRequest, bool)
- func (invocation Invocation) OutputFormat() OutputFormat
- func (invocation Invocation) Providers() (ProvidersRequest, bool)
- func (invocation Invocation) Report() (ReportRequest, bool)
- func (invocation Invocation) RequestID() string
- func (invocation Invocation) RequestJSON() ([]byte, bool)
- func (invocation Invocation) Rerun() (RerunRequest, bool)
- func (invocation Invocation) Review() (ReviewRequest, bool)
- func (invocation Invocation) Roles() (RolesRequest, bool)
- func (invocation Invocation) Schema() (SchemaRequest, bool)
- func (invocation Invocation) Status() (StatusRequest, bool)
- type OutputFormat
- type ProvidersRequest
- type PublicationQueryService
- type PublicationReportService
- type RedactedExportRequest
- type RedactedExportResult
- type RedactedExportService
- type RedactedExportServiceFunc
- type RenderedReport
- type ReplayMode
- type ReportRequest
- type RequestIDGenerator
- type RequestResolver
- type RerunRequest
- type RerunService
- type Result
- type ResultStream
- type ResultWriteError
- type RetentionRequest
- type RetentionResult
- type RetentionService
- type RetentionServiceFunc
- type ReviewPreflightBudget
- type ReviewPreflightCeilings
- type ReviewPreflightFile
- type ReviewPreflightFileSet
- type ReviewPreflightGeneratedFile
- type ReviewPreflightLaneDeadline
- type ReviewPreflightResult
- type ReviewPreflightService
- type ReviewPreflightTarget
- type ReviewPreflightTransmission
- type ReviewRequest
- func (request ReviewRequest) ArtistAutomatic() bool
- func (request ReviewRequest) ArtistBrief() (string, bool)
- func (request ReviewRequest) ArtistDesignSpecs() []string
- func (request ReviewRequest) Objective() (string, bool)
- func (request ReviewRequest) Preflight() bool
- func (request ReviewRequest) Roles() []string
- func (request ReviewRequest) RolesExplicit() bool
- func (request ReviewRequest) SessionID() (string, bool)
- func (request ReviewRequest) Target() TargetRequest
- type ReviewRunInputSourceFactory
- type ReviewRunResult
- func (result ReviewRunResult) ReviewArtifactURI() string
- func (result ReviewRunResult) RoleReportURIs() []RoleReportURI
- func (result ReviewRunResult) RunID() string
- func (result ReviewRunResult) RunManifestURI() string
- func (result ReviewRunResult) SessionID() string
- func (result ReviewRunResult) TerminalExit() domain.OperationalExitDecision
- func (result ReviewRunResult) TerminalProviderFailures() []reviewrun.ProviderExecutionFailure
- func (result ReviewRunResult) Validate() error
- type ReviewRunService
- func NewPolicyReviewRunService(service ReviewRunService, _ []domain.Role, enabled map[domain.Role]bool) ReviewRunService
- func NewPolicyReviewRunServiceWithArtistInputs(service ReviewRunService, _ []domain.Role, enabled map[domain.Role]bool, ...) ReviewRunService
- func NewReviewRunService(service *reviewrun.Service, factory ReviewRunInputSourceFactory) ReviewRunService
- func NewUnavailableReviewRunService(cause error) ReviewRunService
- type ReviewRunServicePreparer
- type RoleReportURI
- type RolesRequest
- type RunStatusView
- type SchemaOperation
- type SchemaRequest
- type StartedRun
- type StatusRequest
- type TargetRequest
Constants ¶
This section is empty.
Variables ¶
ErrSelectorUnavailable marks a syntactically valid selector that has no unique match.
var ErrUsage = errors.New("mulgae usage error")
ErrUsage marks an argument error that the CLI must render with exit code 2.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is the executable foundation command surface. It owns no mutable process state and only reaches the filesystem, Git, and environment through the injected ports.
func NewApplication ¶
func NewApplication(dependencies Dependencies) (*Application, error)
NewApplication constructs the foundation CLI application. Required dependencies are rejected before any command can execute. The online workflow trio is one authority capability; resolver, review, retention, and export capabilities are independently optional. Optional typed-nil dependencies are normalized.
func (*Application) Run ¶
func (application *Application) Run(ctx context.Context, argv []string, canonicalDefaultRoot string) Result
Run parses and executes argv against canonicalDefaultRoot. It never returns raw adapter errors: machine output contains a validated envelope when the parser supplied a contract-valid request, while human failures use stderr.
type Availability ¶
type Availability string
Availability describes whether a command is executable in the current milestone.
const ( // AvailabilityFoundation identifies an executable foundation command. AvailabilityFoundation Availability = "foundation" // AvailabilityFutureMilestone identifies a recognized but unavailable command. AvailabilityFutureMilestone Availability = "future_milestone" )
type CleanRequest ¶
type CleanRequest struct {
// contains filtered or unexported fields
}
CleanRequest contains one immutable cleanup selection.
func (CleanRequest) All ¶ added in v0.1.10
func (request CleanRequest) All() bool
All reports whether every safely deletable terminal run was selected.
func (CleanRequest) DryRun ¶ added in v0.1.10
func (request CleanRequest) DryRun() bool
DryRun reports whether cleanup is observation-only.
func (CleanRequest) OlderThanDays ¶ added in v0.1.10
func (request CleanRequest) OlderThanDays() int64
OlderThanDays returns the selected whole-day age, or zero for --all.
type ConfigMode ¶
type ConfigMode string
ConfigMode selects the configuration view returned by the config service.
const ( // ConfigModeEffective selects the effective configuration view. ConfigModeEffective ConfigMode = "effective" // ConfigModeProvenance selects the provenance configuration view. ConfigModeProvenance ConfigMode = "provenance" )
type ConfigRequest ¶
type ConfigRequest struct {
// contains filtered or unexported fields
}
ConfigRequest contains the executable configuration-selection fields.
func (ConfigRequest) Mode ¶
func (request ConfigRequest) Mode() ConfigMode
Mode returns the requested configuration view.
func (ConfigRequest) ProjectRoot ¶
func (request ConfigRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for configuration.
type DeltaRequest ¶
type DeltaRequest struct {
// contains filtered or unexported fields
}
DeltaRequest contains the immutable source run, target, and roles.
func (DeltaRequest) Roles ¶
func (request DeltaRequest) Roles() []string
Roles returns a caller-owned copy of the requested roles.
func (DeltaRequest) SourceRunID ¶
func (request DeltaRequest) SourceRunID() string
SourceRunID returns the source run selected for the delta workflow.
func (DeltaRequest) Target ¶
func (request DeltaRequest) Target() TargetRequest
Target returns the literal target request.
type DeltaRunService ¶
type DeltaRunService interface {
StartDeltaRun(context.Context, appdelta.StartRequest) (StartedRun, error)
}
DeltaRunService is the command-facing delta workflow boundary.
func NewDeltaRunService ¶
func NewDeltaRunService(service *appdelta.Service) DeltaRunService
NewDeltaRunService adapts the delta application service to command wiring.
type Dependencies ¶
type Dependencies struct {
Clock ports.Clock
RequestIDGenerator RequestIDGenerator
RequestResolver RequestResolver
Catalog ports.ContractCatalog
JSONSchemaValidator cli.SchemaValidator
SecureWriter ports.SecureFileWriter
TrustedProjectReader ports.TrustedProjectReader
EnvironmentInspector ports.EnvironmentInspector
PublicationQueries PublicationQueryService
DiagnosticQueries ports.RuntimeDiagnosticQuery
PublicationReports PublicationReportService
FollowupRuns FollowupRunService
ReviewRuns ReviewRunService
DeltaRuns DeltaRunService
Reruns RerunService
Retention RetentionService
Exports RedactedExportService
EvidenceReader doctor.EvidenceReader
}
Dependencies are the explicit inward dependencies required by Application. The G006 query/report pair is optional for source compatibility, but it must be supplied as one complete pair. EvidenceReader is optional and absent authority evidence remains unverified.
func NewG008Dependencies ¶
func NewG008Dependencies(composition G008Composition) (Dependencies, error)
NewG008Dependencies composes only G008 command capabilities. Callers merge its result with the independently constructed foundation Dependencies.
type DoctorRequest ¶
type DoctorRequest struct {
// contains filtered or unexported fields
}
DoctorRequest contains the executable doctor fields.
func (DoctorRequest) CheckPlatform ¶
func (request DoctorRequest) CheckPlatform() bool
CheckPlatform reports the fixed platform-check selection.
func (DoctorRequest) CheckProviders ¶
func (request DoctorRequest) CheckProviders() bool
CheckProviders reports the fixed provider-check selection.
func (DoctorRequest) ProjectRoot ¶
func (request DoctorRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for diagnosis.
type ExcerptRequest ¶
type ExcerptRequest struct {
// contains filtered or unexported fields
}
ExcerptRequest contains the immutable evidence-excerpt fields.
func (ExcerptRequest) CurrentTargetSHA256 ¶
func (request ExcerptRequest) CurrentTargetSHA256() string
CurrentTargetSHA256 returns the immutable current-target integrity identifier.
func (ExcerptRequest) FindingID ¶
func (request ExcerptRequest) FindingID() string
FindingID returns the selected canonical run-scoped finding ID.
func (ExcerptRequest) RunID ¶
func (request ExcerptRequest) RunID() string
RunID returns the selected canonical review-run ID.
type ExportRequest ¶
type ExportRequest struct {
// contains filtered or unexported fields
}
ExportRequest contains the immutable redacted export selection.
func (ExportRequest) OutputPath ¶
func (request ExportRequest) OutputPath() string
OutputPath returns the safe relative export output path.
func (ExportRequest) Redacted ¶
func (request ExportRequest) Redacted() bool
Redacted reports the schema-required redacted export mode.
func (ExportRequest) RunID ¶
func (request ExportRequest) RunID() string
RunID returns the source run selected for export.
type FindingView ¶
FindingView is one finding in the query service's preserved final order.
type FindingsRequest ¶
type FindingsRequest struct {
// contains filtered or unexported fields
}
FindingsRequest contains the immutable finding-query fields.
func (FindingsRequest) MinimumSeverity ¶
func (request FindingsRequest) MinimumSeverity() domain.Severity
MinimumSeverity returns the inclusive severity threshold for the query.
func (FindingsRequest) RunID ¶
func (request FindingsRequest) RunID() string
RunID returns the selected canonical review-run ID.
type FindingsView ¶
type FindingsView struct {
RunID string
Findings []FindingView
ReviewArtifactURI string
}
FindingsView is a committed finding selection and its committed review URI.
type FollowupRequest ¶
type FollowupRequest struct {
// contains filtered or unexported fields
}
FollowupRequest contains the immutable source finding and target fields.
func (FollowupRequest) FindingID ¶
func (request FollowupRequest) FindingID() string
FindingID returns the source finding selected for followup.
func (FollowupRequest) Objective ¶
func (request FollowupRequest) Objective() (string, bool)
Objective returns the optional followup objective.
func (FollowupRequest) Role ¶
func (request FollowupRequest) Role() (string, bool)
Role returns the optional followup role.
func (FollowupRequest) SourceRunID ¶
func (request FollowupRequest) SourceRunID() string
SourceRunID returns the source run selected for the child workflow.
func (FollowupRequest) Target ¶
func (request FollowupRequest) Target() TargetRequest
Target returns the literal target request.
type FollowupRunService ¶
type FollowupRunService interface {
StartFollowupRun(context.Context, appfollowup.Request) (StartedRun, error)
}
FollowupRunService is the command-facing followup workflow boundary.
func NewFollowupRunService ¶
func NewFollowupRunService(service *appfollowup.Service) FollowupRunService
NewFollowupRunService adapts the followup application service to command wiring.
type G008Composition ¶
type G008Composition struct {
Root ports.AnchoredRoot
Queries *appquery.Service
RequestResolver *G008RequestResolver
Clock ports.Clock
IDs G008IdentityGenerator
ExportInstaller appexport.ExportInstaller
PublicationAuthority ports.PublicationStore
Online *G008OnlineAuthority
CleanStore appclean.ApplyStore
CleanValidator appclean.SchemaValidator
}
G008Composition is the complete input for the G008 Dependencies projection. Export and selector resolution remain available without online authority.
type G008IdentityGenerator ¶
type G008IdentityGenerator interface {
RequestIDGenerator
NewRunID(time.Time) (domain.RunID, error)
}
G008IdentityGenerator supplies the distinct identities needed by command envelopes, delta children, and rerun children.
type G008OnlineAuthority ¶
type G008OnlineAuthority struct {
FollowupTargetCapturer appfollowup.CurrentTargetCapturer
DeltaTargetCapturer appdelta.TargetCapturer
DeltaComparator appdelta.Comparator
ChildExecutor *childrun.Executor
FollowupExecutor *childrun.FollowupExecutor
RerunAssignments []review.Assignment
}
G008OnlineAuthority is the complete, explicit authority required to create online child workflows. A nil authority leaves all three workflows absent; a partial authority is rejected rather than inferred from adjacent services.
type G008RequestResolver ¶
type G008RequestResolver struct {
// contains filtered or unexported fields
}
G008RequestResolver resolves CLI selectors using the P2 query service. Its captured stdin is owned by this resolver and is never kept in package state.
func NewG008RequestResolver ¶
func NewG008RequestResolver(root ports.AnchoredRoot, queries *appquery.Service, enumerator G008RunEnumerator, reader io.Reader, limit ...int64) (*G008RequestResolver, error)
NewG008RequestResolver constructs the production selector resolver. The optional positive limit supports bounded integration fixtures; production capture has no fixed source-size ceiling.
func (*G008RequestResolver) CaptureTarget ¶
func (resolver *G008RequestResolver) CaptureTarget(ctx context.Context) (string, error)
CaptureTarget reads the injected stdin exactly once, freezes the successful bytes behind an invocation-scoped opaque token, and returns that token on every call. The token contains no review input bytes or input-derived data.
func (*G008RequestResolver) Diagnostics ¶
func (resolver *G008RequestResolver) Diagnostics() []string
Diagnostics returns a defensive copy of deterministic latest-selection exclusions from the most recent latest resolution.
func (*G008RequestResolver) ResolveAttempt ¶
func (resolver *G008RequestResolver) ResolveAttempt(ctx context.Context, runSelector, roleSelector, provider string) (string, error)
ResolveAttempt delegates exact role/provider uniqueness to query.Service.
func (*G008RequestResolver) ResolvePublicationRun ¶
func (resolver *G008RequestResolver) ResolvePublicationRun(ctx context.Context, root ports.AnchoredRoot, runID domain.RunID) (ports.PublicationRun, error)
ResolvePublicationRun resolves an explicit canonical run within this resolver's anchored root. It shares the resolver's P2 query authority and deliberately does not enumerate the run namespace.
func (*G008RequestResolver) ResolveRun ¶
func (resolver *G008RequestResolver) ResolveRun(ctx context.Context, selector string) (string, error)
ResolveRun resolves an explicit canonical ID through the query boundary, or selects latest strictly from fresh P2 committed observations.
func (*G008RequestResolver) TakeCapturedStdin ¶
func (resolver *G008RequestResolver) TakeCapturedStdin(ctx context.Context, token string) ([]byte, error)
TakeCapturedStdin transfers a defensive copy of a captured stdin value once. It removes and zeroes the resolver-owned input before returning.
type G008RunEnumerator ¶
type G008RunEnumerator interface {
Enumerate(context.Context, ports.AnchoredRoot) ([]filesystem.RunCandidate, []filesystem.RunSelectorDiagnostic, error)
}
G008RunEnumerator is the filesystem-only namespace projection used to find possible runs. It deliberately has no P2 interpretation authority.
type G008RunResolver ¶
type G008RunResolver interface {
ResolvePublicationRun(context.Context, ports.AnchoredRoot, domain.RunID) (ports.PublicationRun, error)
}
G008RunResolver resolves an already-canonical source ID beneath the current anchored artifact root. It intentionally has no filesystem or selector authority of its own.
type G008RuntimePromptSource ¶
type G008RuntimePromptSource struct {
// contains filtered or unexported fields
}
G008RuntimePromptSource is the production prompt-source seam for child delta and exact replay execution. Prompt construction is supplied explicitly; this source verifies all persisted P2 authority before forwarding it.
func NewG008RuntimePromptSource ¶
func NewG008RuntimePromptSource( sources *G008Sources, prompts review.InvocationPromptSource, delta review.DeltaInvocationPromptSource, replay review.ExactReplayPromptSource, ) (*G008RuntimePromptSource, error)
NewG008RuntimePromptSource requires distinct ordinary, delta-aware, and exact-replay prompt authorities. No mode falls back to another authority.
func (*G008RuntimePromptSource) DeltaPrompt ¶
func (source *G008RuntimePromptSource) DeltaPrompt(ctx context.Context, job review.InvocationJob, material review.DeltaInvocationMaterial, repair *review.InvocationRepairInput) (review.RuntimePrompt, error)
func (*G008RuntimePromptSource) ExactReplayPrompt ¶
func (source *G008RuntimePromptSource) ExactReplayPrompt(ctx context.Context, job review.InvocationJob, input review.ExactReplayInput) (review.RuntimePrompt, error)
func (*G008RuntimePromptSource) Prompt ¶
func (source *G008RuntimePromptSource) Prompt(ctx context.Context, job review.InvocationJob, repair *review.InvocationRepairInput) (review.RuntimePrompt, error)
type G008Sources ¶
type G008Sources struct {
// contains filtered or unexported fields
}
G008Sources is the root-bound P2 source authority shared by G008 wiring. It has no mutable target, provider-output, or publication-write fallback.
func NewG008Sources ¶
func NewG008Sources(root ports.AnchoredRoot, resolver G008RunResolver, query *appquery.Service) (*G008Sources, error)
func (*G008Sources) ReadFollowupSource ¶
func (sources *G008Sources) ReadFollowupSource(ctx context.Context, runID domain.RunID, findingID string) (appfollowup.VerifiedSource, error)
func (*G008Sources) ReadRerunSource ¶
func (sources *G008Sources) ReadRerunSource(ctx context.Context, runID domain.RunID, attemptID domain.AttemptID) (apprerun.SourceAttempt, error)
func (*G008Sources) ReadSource ¶
func (sources *G008Sources) ReadSource(ctx context.Context, runID domain.RunID) (appdelta.SourceSnapshot, error)
type HelpRequest ¶
type HelpRequest struct {
// contains filtered or unexported fields
}
HelpRequest contains a validated fixed help topic.
func (HelpRequest) Topic ¶
func (request HelpRequest) Topic() string
Topic returns the requested help topic.
type InitRequest ¶
type InitRequest struct {
// contains filtered or unexported fields
}
InitRequest contains the executable init fields. ContextPath is absent unless the user explicitly supplied --context.
func (InitRequest) AGYOverrides ¶
func (request InitRequest) AGYOverrides() (string, string)
func (InitRequest) ArtistInputs ¶
func (request InitRequest) ArtistInputs() (string, []string)
func (InitRequest) ContextPath ¶
func (request InitRequest) ContextPath() (string, bool)
ContextPath returns the optional safe relative context path.
func (InitRequest) KimiOverrides ¶
func (request InitRequest) KimiOverrides() (string, string, string)
func (InitRequest) NativeHome ¶
func (request InitRequest) NativeHome() (string, bool)
func (InitRequest) Overwrite ¶
func (request InitRequest) Overwrite() bool
func (InitRequest) ProjectKind ¶
func (request InitRequest) ProjectKind() (string, bool)
func (InitRequest) ProjectName ¶
func (request InitRequest) ProjectName() string
ProjectName returns the validated project name.
func (InitRequest) ProjectRoot ¶
func (request InitRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for initialization.
func (InitRequest) Roles ¶
func (request InitRequest) Roles() []string
Roles returns the canonical project role set selected for initialization.
func (InitRequest) Selection ¶
func (request InitRequest) Selection() (string, []string)
func (InitRequest) ZCodeOverrides ¶
func (request InitRequest) ZCodeOverrides() (string, string)
type Invocation ¶
type Invocation struct {
// contains filtered or unexported fields
}
Invocation is the immutable result of parsing one Mulgae command line.
func Parse ¶
func Parse(arguments []string, defaultProjectRoot, requestID string) (Invocation, error)
Parse converts command-line arguments into one immutable Mulgae invocation. The caller must supply a canonical default project root and a UUIDv7 request ID. Parse does not inspect the filesystem, environment, or service state.
func ParseResolved ¶
func ParseResolved(ctx context.Context, arguments []string, defaultProjectRoot, requestID string, resolver RequestResolver) (Invocation, error)
ParseResolved resolves documented CLI selectors before freezing the exact schema request object. Parse remains the pure canonical-ID entry point.
func (Invocation) Availability ¶
func (invocation Invocation) Availability() Availability
Availability reports whether the command can execute in this milestone.
func (Invocation) Clean ¶
func (invocation Invocation) Clean() (CleanRequest, bool)
Clean returns the parsed clean fields when this is a clean invocation.
func (Invocation) Command ¶
func (invocation Invocation) Command() app.CommandName
Command returns the exact recognized command name.
func (Invocation) Config ¶
func (invocation Invocation) Config() (ConfigRequest, bool)
Config returns the parsed config fields when this is a config invocation.
func (Invocation) Delta ¶
func (invocation Invocation) Delta() (DeltaRequest, bool)
Delta returns the parsed delta fields when this is a delta invocation.
func (Invocation) Doctor ¶
func (invocation Invocation) Doctor() (DoctorRequest, bool)
Doctor returns the parsed doctor fields when this is a doctor invocation.
func (Invocation) Excerpt ¶
func (invocation Invocation) Excerpt() (ExcerptRequest, bool)
Excerpt returns the parsed excerpt fields when this is an excerpt invocation.
func (Invocation) Export ¶
func (invocation Invocation) Export() (ExportRequest, bool)
Export returns the parsed export fields when this is an export invocation.
func (Invocation) Findings ¶
func (invocation Invocation) Findings() (FindingsRequest, bool)
Findings returns the parsed findings fields when this is a findings invocation.
func (Invocation) Followup ¶
func (invocation Invocation) Followup() (FollowupRequest, bool)
Followup returns the parsed followup fields when this is a followup invocation.
func (Invocation) FutureMilestone ¶
func (invocation Invocation) FutureMilestone() bool
FutureMilestone reports whether dispatch must reject the command as unavailable.
func (Invocation) Help ¶
func (invocation Invocation) Help() (HelpRequest, bool)
Help returns the parsed help fields when this is a help invocation.
func (Invocation) Init ¶
func (invocation Invocation) Init() (InitRequest, bool)
Init returns the parsed init fields when this is an init invocation.
func (Invocation) OutputFormat ¶
func (invocation Invocation) OutputFormat() OutputFormat
OutputFormat returns the selected response representation.
func (Invocation) Providers ¶
func (invocation Invocation) Providers() (ProvidersRequest, bool)
Providers returns the parsed providers fields when this is a providers invocation.
func (Invocation) Report ¶
func (invocation Invocation) Report() (ReportRequest, bool)
Report returns the parsed report fields when this is a report invocation.
func (Invocation) RequestID ¶
func (invocation Invocation) RequestID() string
RequestID returns the caller-provided request identifier.
func (Invocation) RequestJSON ¶
func (invocation Invocation) RequestJSON() ([]byte, bool)
RequestJSON returns a caller-owned copy of the exact command-request object. The boolean is false when no contract-consistent request object is available.
func (Invocation) Rerun ¶
func (invocation Invocation) Rerun() (RerunRequest, bool)
Rerun returns the parsed rerun fields when this is a rerun invocation.
func (Invocation) Review ¶
func (invocation Invocation) Review() (ReviewRequest, bool)
Review returns the parsed review fields when this is a review invocation.
func (Invocation) Roles ¶
func (invocation Invocation) Roles() (RolesRequest, bool)
Roles returns the parsed role-catalog listing fields when this is a roles invocation.
func (Invocation) Schema ¶
func (invocation Invocation) Schema() (SchemaRequest, bool)
Schema returns the parsed schema fields when this is a schema invocation.
func (Invocation) Status ¶
func (invocation Invocation) Status() (StatusRequest, bool)
Status returns the parsed status fields when this is a status invocation.
type OutputFormat ¶
type OutputFormat string
OutputFormat controls the CLI rendering selected by an invocation.
const ( // OutputFormatJSON requests the machine-readable command envelope. OutputFormatJSON OutputFormat = "json" // OutputFormatHuman requests the human-readable command envelope. OutputFormatHuman OutputFormat = "human" )
type ProvidersRequest ¶
type ProvidersRequest struct {
// contains filtered or unexported fields
}
ProvidersRequest contains the immutable provider-profile listing fields.
func (ProvidersRequest) IncludeUnverified ¶
func (request ProvidersRequest) IncludeUnverified() bool
IncludeUnverified reports whether unverified provider profiles are included.
func (ProvidersRequest) ProjectRoot ¶
func (request ProvidersRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for provider listing.
type PublicationQueryService ¶
type PublicationQueryService interface {
ResolveRun(context.Context, ports.AnchoredRoot, domain.RunID) (ports.PublicationRun, error)
ReadRunStatus(context.Context, ports.PublicationRun) (RunStatusView, error)
ListFindings(context.Context, ports.PublicationRun, domain.Severity) (FindingsView, error)
RenderExcerpt(context.Context, ports.PublicationRun, string, string) ([]byte, error)
}
PublicationQueryService is the command-facing projection of the durable G006 query API. It deliberately accepts an already anchored artifact root so command handlers cannot discover publication files themselves.
func NewPublicationQueryService ¶
func NewPublicationQueryService(service *appquery.Service) PublicationQueryService
NewPublicationQueryService adapts the existing query service to the narrow command boundary. A nil service remains nil so optional-group validation can distinguish an absent service from a complete G006 dependency group.
type PublicationReportService ¶
type PublicationReportService interface {
Render(context.Context, ports.PublicationRun) (RenderedReport, error)
}
PublicationReportService is the command-facing projection of the G006 report renderer. SourceIDs bind a persisted report to its committed inputs.
func NewPublicationReportService ¶
func NewPublicationReportService(service *appreport.Service) PublicationReportService
NewPublicationReportService adapts the existing report service to the narrow command boundary. A nil service remains nil so optional-group validation can distinguish an absent service from a complete G006 dependency group.
type RedactedExportRequest ¶
type RedactedExportRequest struct {
RunID string
OutputPath string
Redacted bool
ProjectRoot ports.AnchoredRoot
}
RedactedExportRequest is the complete schema-backed export selection.
type RedactedExportResult ¶
RedactedExportResult is the authoritative persisted export projection.
type RedactedExportService ¶
type RedactedExportService interface {
ExportRedactedRun(context.Context, RedactedExportRequest) (RedactedExportResult, error)
}
RedactedExportService is the command-facing export workflow boundary.
func NewRedactedExportService ¶
func NewRedactedExportService( queries *appquery.Service, installer appexport.ExportInstaller, clock ports.Clock, requestIDs RequestIDGenerator, ) (RedactedExportService, error)
NewRedactedExportService composes offline export from verified P2 query reads and a paired secure export installer. It deliberately accepts no provider or runtime authority.
type RedactedExportServiceFunc ¶
type RedactedExportServiceFunc func(context.Context, RedactedExportRequest) (RedactedExportResult, error)
RedactedExportServiceFunc adapts a command export function to RedactedExportService.
func (RedactedExportServiceFunc) ExportRedactedRun ¶
func (fn RedactedExportServiceFunc) ExportRedactedRun(ctx context.Context, request RedactedExportRequest) (RedactedExportResult, error)
type RenderedReport ¶
RenderedReport is an immutable report projection for one committed run.
type ReplayMode ¶
type ReplayMode string
ReplayMode identifies the rerun prompt construction mode.
const ( // ReplayModeExact reuses the captured source invocation exactly. ReplayModeExact ReplayMode = "exact" // ReplayModeRecompose recompiles from current trusted templates. ReplayModeRecompose ReplayMode = "recompose" )
type ReportRequest ¶
type ReportRequest struct {
// contains filtered or unexported fields
}
ReportRequest contains the immutable report-rendering fields.
func (ReportRequest) OutputPath ¶
func (request ReportRequest) OutputPath() string
OutputPath returns the selected safe relative report path.
func (ReportRequest) RunID ¶
func (request ReportRequest) RunID() string
RunID returns the selected canonical review-run ID.
type RequestIDGenerator ¶
RequestIDGenerator creates the request identifier bound into a parsed command request and its command-result envelope.
type RequestResolver ¶
type RequestResolver interface {
ResolveRun(context.Context, string) (string, error)
ResolveAttempt(context.Context, string, string, string) (string, error)
CaptureTarget(context.Context) (string, error)
}
RequestResolver resolves CLI-only selectors before a schema request is frozen. Implementations must return canonical IDs and a nonempty captured stdin target.
type RerunRequest ¶
type RerunRequest struct {
// contains filtered or unexported fields
}
RerunRequest contains the immutable source attempt and replay selection.
func (RerunRequest) ReplayMode ¶
func (request RerunRequest) ReplayMode() ReplayMode
ReplayMode returns the selected replay construction mode.
func (RerunRequest) SourceAttemptID ¶
func (request RerunRequest) SourceAttemptID() string
SourceAttemptID returns the source attempt selected for replay.
func (RerunRequest) SourceRunID ¶
func (request RerunRequest) SourceRunID() string
SourceRunID returns the source run selected for replay.
type RerunService ¶
RerunService is the command-facing rerun workflow boundary.
func NewRerunService ¶
func NewRerunService(service *appreplay.Service) RerunService
NewRerunService adapts the rerun application service to command wiring.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is the complete process projection of one invocation. Stdout and Stderr return caller-owned copies so a caller cannot mutate application-owned response bytes.
type ResultStream ¶ added in v0.1.5
type ResultStream string
ResultStream identifies the process stream whose delivery failed.
const ( // ResultStreamStdout is the command result stream. ResultStreamStdout ResultStream = "stdout" // ResultStreamStderr is the command diagnostic stream. ResultStreamStderr ResultStream = "stderr" )
type ResultWriteError ¶ added in v0.1.5
type ResultWriteError struct {
// contains filtered or unexported fields
}
ResultWriteError reports an incomplete command-result delivery.
func (*ResultWriteError) Error ¶ added in v0.1.5
func (err *ResultWriteError) Error() string
func (*ResultWriteError) Stream ¶ added in v0.1.5
func (err *ResultWriteError) Stream() ResultStream
Stream returns the stream whose delivery failed.
func (*ResultWriteError) Unwrap ¶ added in v0.1.5
func (err *ResultWriteError) Unwrap() error
Unwrap returns the underlying writer failure.
type RetentionRequest ¶
RetentionRequest is the complete schema-backed clean command selection.
type RetentionResult ¶
RetentionResult is the authoritative cleanup summary.
type RetentionService ¶
type RetentionService interface {
CleanRuns(context.Context, RetentionRequest) (RetentionResult, error)
}
RetentionService is the command-facing retention workflow boundary.
func NewRetentionService ¶
func NewRetentionService(service *appclean.Service) RetentionService
NewRetentionService adapts the cleanup application service to the command boundary.
type RetentionServiceFunc ¶
type RetentionServiceFunc func(context.Context, RetentionRequest) (RetentionResult, error)
RetentionServiceFunc adapts a command retention function to RetentionService.
func (RetentionServiceFunc) CleanRuns ¶ added in v0.1.10
func (fn RetentionServiceFunc) CleanRuns(ctx context.Context, request RetentionRequest) (RetentionResult, error)
type ReviewPreflightBudget ¶ added in v0.1.2
type ReviewPreflightBudget struct {
Eligible bool `json:"eligible"`
ReasonCode string `json:"reason_code"`
MaxActiveLanes int `json:"max_active_lanes"`
TotalInvocations int `json:"total_invocations"`
TotalOutputCapBytes int64 `json:"total_output_cap_bytes"`
CriticalPathDeadline string `json:"critical_path_deadline"`
RunDeadline string `json:"run_deadline"`
Ceilings ReviewPreflightCeilings `json:"ceilings"`
Lanes []ReviewPreflightLaneDeadline `json:"lanes"`
}
type ReviewPreflightCeilings ¶ added in v0.1.2
type ReviewPreflightCeilings struct {
ProviderTimeout string `json:"provider_timeout"`
LaneDeadline string `json:"lane_deadline"`
RunDeadline string `json:"run_deadline"`
MaxInvocationsPerRole int `json:"max_invocations_per_role"`
MaxInvocationsPerRun int `json:"max_invocations_per_run"`
MaxTotalOutputBytes int64 `json:"max_total_output_bytes"`
}
type ReviewPreflightFile ¶ added in v0.1.2
type ReviewPreflightFileSet ¶ added in v0.1.2
type ReviewPreflightFileSet struct {
ID string `json:"id"`
PolicyIdentity string `json:"policy_identity"`
Files []ReviewPreflightFile `json:"files"`
}
type ReviewPreflightGeneratedFile ¶ added in v0.1.2
type ReviewPreflightLaneDeadline ¶ added in v0.1.2
type ReviewPreflightResult ¶ added in v0.1.2
type ReviewPreflightResult struct {
SchemaVersion string `json:"schema_version"`
Status string `json:"status"`
Qualification string `json:"qualification"`
Target ReviewPreflightTarget `json:"target"`
AGYPermissionMode string `json:"agy_permission_mode"`
Warnings []string `json:"warnings"`
FileSets []ReviewPreflightFileSet `json:"file_sets"`
GeneratedFiles []ReviewPreflightGeneratedFile `json:"generated_files"`
Transmissions []ReviewPreflightTransmission `json:"transmissions"`
Budget ReviewPreflightBudget `json:"budget"`
}
ReviewPreflightResult is the schema-facing, deterministic execution-free review projection. Every slice is owned by the result.
func NewReviewPreflightResult ¶ added in v0.1.2
func NewReviewPreflightResult( material ports.CapturedReviewMaterial, workspaceReceipt ports.WorkspaceSnapshotReceipt, requestedKind string, plan reviewrun.ExecutionPlan, budgetReceipt review.RunBudgetReceipt, agyPermissionMode string, ) (ReviewPreflightResult, error)
NewReviewPreflightResult converts the already-captured snapshot and the authoritative pure budget receipt into the stable external projection.
func (ReviewPreflightResult) Validate ¶ added in v0.1.2
func (result ReviewPreflightResult) Validate() (err error)
Validate rejects malformed service projections before either renderer can expose them as successful preflight evidence.
type ReviewPreflightService ¶ added in v0.1.2
type ReviewPreflightService interface {
PreflightReview(context.Context, ReviewRequest, ports.AnchoredRoot) (ReviewPreflightResult, error)
}
ReviewPreflightService projects the exact capture and configured execution envelope without provider discovery, qualification, invocation, or durable publication.
type ReviewPreflightTarget ¶ added in v0.1.2
type ReviewPreflightTransmission ¶ added in v0.1.2
type ReviewPreflightTransmission struct {
Role string `json:"role"`
RouteKind string `json:"route_kind"`
ProviderInstance string `json:"provider_instance"`
ProviderFamily string `json:"provider_family"`
ConfiguredTimeout string `json:"configured_timeout"`
PermissionMode string `json:"permission_mode"`
TargetChannel string `json:"target_channel"`
FileSetID string `json:"file_set_id"`
}
type ReviewRequest ¶
type ReviewRequest struct {
// contains filtered or unexported fields
}
ReviewRequest contains the immutable independent-review fields.
func ResolveReviewPolicyRequest ¶ added in v0.1.2
func ResolveReviewPolicyRequest(request ReviewRequest, enabled map[domain.Role]bool, artistInputs ports.ArtistReviewInputs, hasArtistInputs bool) (ReviewRequest, error)
ResolveReviewPolicyRequest is the shared normal-run and preflight authority for enabled-role selection plus Config v1 artist defaults and request-scoped overrides. The returned request is canonical and explicitly selected.
func (ReviewRequest) ArtistAutomatic ¶ added in v0.1.11
func (request ReviewRequest) ArtistAutomatic() bool
func (ReviewRequest) ArtistBrief ¶
func (request ReviewRequest) ArtistBrief() (string, bool)
ArtistBrief returns the optional review-scoped artist brief path.
func (ReviewRequest) ArtistDesignSpecs ¶
func (request ReviewRequest) ArtistDesignSpecs() []string
ArtistDesignSpecs returns a caller-owned copy of the optional review-scoped visual asset globs.
func (ReviewRequest) Objective ¶
func (request ReviewRequest) Objective() (string, bool)
Objective returns the optional review objective.
func (ReviewRequest) Preflight ¶ added in v0.1.2
func (request ReviewRequest) Preflight() bool
Preflight reports whether the review is an execution-free capture, routing, and budget projection.
func (ReviewRequest) Roles ¶
func (request ReviewRequest) Roles() []string
Roles returns a caller-owned copy of the requested roles.
func (ReviewRequest) RolesExplicit ¶
func (request ReviewRequest) RolesExplicit() bool
RolesExplicit reports whether --roles was supplied by the caller.
func (ReviewRequest) SessionID ¶
func (request ReviewRequest) SessionID() (string, bool)
SessionID returns the optional imported workflow session ID.
func (ReviewRequest) Target ¶
func (request ReviewRequest) Target() TargetRequest
Target returns the literal target request.
type ReviewRunInputSourceFactory ¶
type ReviewRunInputSourceFactory = reviewrun.ImmutableInputSourceFactory
ReviewRunInputSourceFactory is the application-owned immutable capture factory. The entrypoint maps command values into its typed request only.
type ReviewRunResult ¶
type ReviewRunResult struct {
// contains filtered or unexported fields
}
ReviewRunResult is the immutable terminal P2 projection returned by ReviewRunService.
func NewReviewRunResult ¶
func NewReviewRunResult( sessionID string, runID string, runManifestURI string, reviewArtifactURI string, terminalExit domain.OperationalExitDecision, ) ReviewRunResult
NewReviewRunResult creates an immutable terminal review projection.
func (ReviewRunResult) ReviewArtifactURI ¶
func (result ReviewRunResult) ReviewArtifactURI() string
ReviewArtifactURI returns the persisted final review artifact URI.
func (ReviewRunResult) RoleReportURIs ¶ added in v0.1.4
func (result ReviewRunResult) RoleReportURIs() []RoleReportURI
RoleReportURIs returns caller-owned project-relative role report URIs.
func (ReviewRunResult) RunID ¶
func (result ReviewRunResult) RunID() string
RunID returns the terminal review run ID.
func (ReviewRunResult) RunManifestURI ¶
func (result ReviewRunResult) RunManifestURI() string
RunManifestURI returns the persisted run manifest URI.
func (ReviewRunResult) SessionID ¶
func (result ReviewRunResult) SessionID() string
SessionID returns the terminal review session ID.
func (ReviewRunResult) TerminalExit ¶
func (result ReviewRunResult) TerminalExit() domain.OperationalExitDecision
TerminalExit returns the reduced committed P2 exit authority.
func (ReviewRunResult) TerminalProviderFailures ¶ added in v0.1.2
func (result ReviewRunResult) TerminalProviderFailures() []reviewrun.ProviderExecutionFailure
func (ReviewRunResult) Validate ¶
func (result ReviewRunResult) Validate() error
Validate verifies that the result can safely be represented in the review command envelope.
type ReviewRunService ¶
type ReviewRunService interface {
StartReviewRun(context.Context, ReviewRequest, ports.AnchoredRoot) (ReviewRunResult, error)
}
ReviewRunService is the command-facing independent review workflow boundary. It receives the parsed immutable request and an already anchored project root; it owns all provider execution and P2 publication authority.
func NewPolicyReviewRunService ¶
func NewPolicyReviewRunService(service ReviewRunService, _ []domain.Role, enabled map[domain.Role]bool) ReviewRunService
NewPolicyReviewRunService binds the resolved production role policy at the command boundary. An omitted --roles selects every enabled project role; an explicit --roles selects exactly that enabled non-empty subset.
func NewPolicyReviewRunServiceWithArtistInputs ¶
func NewPolicyReviewRunServiceWithArtistInputs(service ReviewRunService, _ []domain.Role, enabled map[domain.Role]bool, artistInputs ports.ArtistReviewInputs) ReviewRunService
NewPolicyReviewRunServiceWithArtistInputs binds Config v1 artist inputs as review defaults. Request-scoped values are resolved after role selection.
func NewReviewRunService ¶
func NewReviewRunService(service *reviewrun.Service, factory ReviewRunInputSourceFactory) ReviewRunService
NewReviewRunService adapts the provider-neutral review-run service to the command boundary. Nil and typed-nil dependencies preserve the optional review provider-unavailable path.
func NewUnavailableReviewRunService ¶
func NewUnavailableReviewRunService(cause error) ReviewRunService
NewUnavailableReviewRunService retains a safe, typed composition diagnostic when production review authority could not be composed. It is deliberately a service rather than a nil dependency so review failures remain actionable.
type ReviewRunServicePreparer ¶
type ReviewRunServicePreparer interface {
PrepareReviewRun(context.Context, ports.AnchoredRoot) (ReviewRunService, error)
}
ReviewRunServicePreparer is the optional lazy-composition boundary used by the standalone binary. Preparation happens only for review, but before the handler creates the private publication directory.
type RoleReportURI ¶ added in v0.1.4
RoleReportURI is one project-relative role-report projection.
type RolesRequest ¶
type RolesRequest struct{}
RolesRequest identifies the static built-in role inventory request.
type RunStatusView ¶
type RunStatusView struct {
SessionID string
RunID string
RunState domain.RunState
HasRunState bool
PublicationState domain.PublicationStatus
RecoveryAction domain.RecoveryAction
FinalArtifactURI string
HasFinalArtifact bool
ContentVerdict domain.ContentVerdict
CoverageStatus domain.CoverageStatus
CIDecision domain.CIDecision
HasAxes bool
RoleReportURIs []RoleReportURI
}
RunStatusView is the safe status projection returned by PublicationQueryService. FinalArtifactURI and the independent outcome axes are present only after a P2 committed read. HasAxes makes the three axes an all-or-none projection. RoleReportURIs are present only after independently verified P2 support checks.
type SchemaOperation ¶
type SchemaOperation string
SchemaOperation selects a schema catalog operation.
const ( // SchemaOperationList lists the embedded schema catalog. SchemaOperationList SchemaOperation = "list" // SchemaOperationShow renders one embedded schema. SchemaOperationShow SchemaOperation = "show" // SchemaOperationExport securely writes one embedded schema. SchemaOperationExport SchemaOperation = "export" )
type SchemaRequest ¶
type SchemaRequest struct {
// contains filtered or unexported fields
}
SchemaRequest contains the executable schema catalog fields.
func (SchemaRequest) ExportPath ¶
func (request SchemaRequest) ExportPath() (string, bool)
ExportPath returns the selected safe relative export path for export operations.
func (SchemaRequest) Operation ¶
func (request SchemaRequest) Operation() SchemaOperation
Operation returns the explicit schema catalog operation.
func (SchemaRequest) ProjectRoot ¶
func (request SchemaRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for schema export.
func (SchemaRequest) SchemaID ¶
func (request SchemaRequest) SchemaID() (string, bool)
SchemaID returns the selected schema identifier for show and export operations.
type StartedRun ¶
type StartedRun struct {
SessionID string
RunID string
ArtifactURI string
FollowupResolution *domain.FollowupResolution
StructuredExtractionStatus domain.StructuredExtractionStatus
RoleReportURIs []RoleReportURI
TerminalExit domain.OperationalExitDecision
}
StartedRun is the authoritative projection of a newly started child workflow.
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
StatusRequest contains the immutable run selected for status lookup.
func (StatusRequest) RunID ¶
func (request StatusRequest) RunID() string
RunID returns the selected canonical review-run ID.
type TargetRequest ¶
type TargetRequest struct {
// contains filtered or unexported fields
}
TargetRequest contains one literal command-request target.
func (TargetRequest) Kind ¶
func (request TargetRequest) Kind() string
Kind returns the selected project or external-input target kind.
func (TargetRequest) Value ¶
func (request TargetRequest) Value() string
Value returns the target value.