Documentation
¶
Overview ¶
Package mulgae parses the fixed Mulgae command line into immutable invocations.
Index ¶
- Constants
- Variables
- type Application
- func (application *Application) PreflightReview(ctx context.Context, request ReviewRequest, projectRoot ports.AnchoredRoot) (ReviewPreflightResult, error)
- func (application *Application) Run(ctx context.Context, argv []string, canonicalDefaultRoot string) Result
- func (application *Application) StartReviewRun(ctx context.Context, request ReviewRequest, projectRoot ports.AnchoredRoot) (ReviewRunResult, error)
- type Availability
- type CleanRequest
- type ConfigMode
- type ConfigRequest
- type Dependencies
- type DoctorRequest
- type ExcerptRequest
- type ExportRequest
- type FindingsRequest
- type G008Composition
- type G008IdentityGenerator
- type G008RequestResolver
- func (resolver *G008RequestResolver) Diagnostics() []string
- 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)
- type G008RunEnumerator
- type HeartbeatRequest
- type HeartbeatService
- type HelpRequest
- type InitRequest
- func (request InitRequest) AgyOverrides() (string, string, string, bool, bool)
- func (request InitRequest) ArtistInputs() (string, []string)
- func (request InitRequest) CodexOverrides() (string, string, string)
- func (request InitRequest) ContextPath() (string, bool)
- func (request InitRequest) CursorExecutable() string
- func (request InitRequest) GrokExecutable() string
- func (request InitRequest) GrokOverrides() (string, string, string, bool, bool)
- 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) ProjectPolicyOptions() bool
- func (request InitRequest) ProjectRoot() string
- func (request InitRequest) RefreshLocal() bool
- func (request InitRequest) Roles() []string
- func (request InitRequest) Selection() (string, []string)
- func (request InitRequest) ZCodeAppBundle() string
- func (request InitRequest) ZCodeOverrides() (string, string, string, bool, bool)
- type InitServiceFactory
- 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) Doctor() (DoctorRequest, bool)
- func (invocation Invocation) Excerpt() (ExcerptRequest, bool)
- func (invocation Invocation) Export() (ExportRequest, bool)
- func (invocation Invocation) Findings() (FindingsRequest, bool)
- func (invocation Invocation) FutureMilestone() bool
- func (invocation Invocation) Heartbeat() (HeartbeatRequest, 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) 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 ReportRequest
- type RequestIDGenerator
- type RequestResolver
- type RequirementsPreflightItem
- type RequirementsPreflightSummary
- type Result
- type ResultStream
- type ResultWriteError
- type RetentionRequest
- type RetentionResult
- type RetentionService
- type RetentionServiceFunc
- type ReviewPreflightBudget
- type ReviewPreflightCeilings
- type ReviewPreflightRead
- type ReviewPreflightResult
- type ReviewPreflightRolePath
- type ReviewPreflightService
- type ReviewPreflightTransmission
- type ReviewRequest
- type ReviewRunResult
- func (result ReviewRunResult) Guarded() bool
- func (result ReviewRunResult) ProjectBinding() string
- 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) SourceIdentitySHA256() string
- func (result ReviewRunResult) TerminalExit() domain.OperationalExitDecision
- func (result ReviewRunResult) TerminalProviderFailures() []reviewrun.ProviderExecutionFailure
- func (result ReviewRunResult) Validate() error
- type ReviewRunService
- func NewLiveReviewRunService(service *reviewrun.LiveService) 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 NewUnavailableReviewRunService(cause error) ReviewRunService
- type ReviewRunServicePreparer
- type RoleReportURI
- type RolesRequest
- type RunStatusView
- type SchemaOperation
- type SchemaRequest
- type StatusRequest
- type TargetRequest
- type VerifiedReadRequest
Constants ¶
const MaxReportMarkdownBytes int64 = 8 << 20
MaxReportMarkdownBytes bounds the legacy report-to-file mutation. Read-only content chunks have no total-report ceiling.
Variables ¶
ErrAttemptSelectorUnavailable marks a syntactically valid attempt selector that has no unique committed match.
var ErrProjectRootMismatch = errors.New("mulgae project root mismatch")
ErrProjectRootMismatch marks selector resolution attempted outside the canonical project root that owns Mulgae artifacts.
ErrRunSelectorUnavailable marks a syntactically valid run selector that has no committed match.
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) PreflightReview ¶ added in v0.1.13
func (application *Application) PreflightReview( ctx context.Context, request ReviewRequest, projectRoot ports.AnchoredRoot, ) (ReviewPreflightResult, error)
PreflightReview admits and validates the execution-free review projection through the same configured authority used by the CLI.
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.
func (*Application) StartReviewRun ¶ added in v0.1.13
func (application *Application) StartReviewRun( ctx context.Context, request ReviewRequest, projectRoot ports.AnchoredRoot, ) (ReviewRunResult, error)
StartReviewRun preserves the CLI review preparation, private publication root, execution, and terminal validation sequence for other local entrypoints.
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 Dependencies ¶
type Dependencies struct {
NewLocalDoctor func(doctor.LocalDependencies) *doctor.LocalService
DoctorPlatform doctor.LocalPlatformEvidence
ConfigSources ports.ConfigSourceFactory
ConfigCodec appconfig.Codec
Accounts appconfig.AccountObserver
SelectConfigLocality appconfig.LocalitySelector
NewInitService InitServiceFactory
ProjectContexts *appquery.ProjectContextService
Clock ports.Clock
RequestIDGenerator RequestIDGenerator
RequestResolver RequestResolver
Catalog ports.ContractCatalog
JSONSchemaValidator cli.SchemaValidator
SecureWriter ports.SecureFileWriter
TrustedProjectReader ports.TrustedProjectReader
EnvironmentInspector ports.EnvironmentInspector
ProviderVersionObserver ports.ProviderVersionObserver
Heartbeats HeartbeatService
PublicationQueries PublicationQueryService
DiagnosticQueries ports.RuntimeDiagnosticQuery
PublicationReports PublicationReportService
ReviewRuns ReviewRunService
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 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 G008Composition ¶
type G008Composition struct {
ArtifactRoot ports.AnchoredRoot
Queries *appquery.Service
RequestResolver *G008RequestResolver
Clock ports.Clock
IDs G008IdentityGenerator
ExportInstaller appexport.ExportInstaller
PublicationAuthority ports.PublicationStore
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 and verified export identities.
type G008RequestResolver ¶
type G008RequestResolver struct {
// contains filtered or unexported fields
}
G008RequestResolver resolves CLI selectors using the P2 query service. Its stored-publication reads never create or capture source execution state.
func NewG008RequestResolver ¶
func NewG008RequestResolver(artifactRoot ports.AnchoredRoot, queries *appquery.Service, enumerator G008RunEnumerator) (*G008RequestResolver, error)
NewG008RequestResolver constructs a provider-free publication selector resolver.
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) 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 artifact 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.
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 HeartbeatRequest ¶ added in v0.1.15
type HeartbeatRequest struct {
// contains filtered or unexported fields
}
func (HeartbeatRequest) Authorized ¶ added in v0.1.15
func (request HeartbeatRequest) Authorized() bool
func (HeartbeatRequest) CredentialProfile ¶ added in v0.1.15
func (request HeartbeatRequest) CredentialProfile() string
func (HeartbeatRequest) ProjectRoot ¶ added in v0.1.15
func (request HeartbeatRequest) ProjectRoot() string
func (HeartbeatRequest) ProviderID ¶ added in v0.1.15
func (request HeartbeatRequest) ProviderID() string
type HeartbeatService ¶ added in v0.1.15
type HeartbeatService interface {
ProbeProvider(context.Context, ports.AnchoredRoot, appheartbeat.Request) (appheartbeat.Result, error)
}
HeartbeatService performs one explicitly authorized synthetic live request.
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 ¶ added in v0.1.26
func (InitRequest) ArtistInputs ¶
func (request InitRequest) ArtistInputs() (string, []string)
func (InitRequest) CodexOverrides ¶ added in v0.1.14
func (request InitRequest) CodexOverrides() (string, string, string)
func (InitRequest) ContextPath ¶
func (request InitRequest) ContextPath() (string, bool)
ContextPath returns the optional safe relative context path.
func (InitRequest) CursorExecutable ¶ added in v0.1.26
func (request InitRequest) CursorExecutable() string
func (InitRequest) GrokExecutable ¶ added in v0.1.22
func (request InitRequest) GrokExecutable() string
func (InitRequest) GrokOverrides ¶ added in v0.1.23
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) ProjectPolicyOptions ¶ added in v0.1.13
func (request InitRequest) ProjectPolicyOptions() bool
func (InitRequest) ProjectRoot ¶
func (request InitRequest) ProjectRoot() string
ProjectRoot returns the canonical project root selected for initialization.
func (InitRequest) RefreshLocal ¶ added in v0.1.13
func (request InitRequest) RefreshLocal() bool
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) ZCodeAppBundle ¶ added in v0.1.22
func (request InitRequest) ZCodeAppBundle() string
func (InitRequest) ZCodeOverrides ¶
type InitServiceFactory ¶ added in v0.1.26
type InitServiceFactory func(ports.ConfigInstaller, ports.EnvironmentInspector, ports.ConfigLocalityAttestor, appinit.ResultPrevalidator, ports.Clock, ports.ConfigSourceFactory, appconfig.Codec, ports.ContractCatalog) (*appinit.Service, error)
InitServiceFactory binds the renderer callback without moving construction earlier.
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) 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) FutureMilestone ¶
func (invocation Invocation) FutureMilestone() bool
FutureMilestone reports whether dispatch must reject the command as unavailable.
func (Invocation) Heartbeat ¶ added in v0.1.15
func (invocation Invocation) Heartbeat() (HeartbeatRequest, bool)
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) 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 {
ReadRequirement(context.Context, ports.PublicationRun, domain.ProjectBinding, string, appquery.ContentContinuation) (appquery.ContentChunk, error)
ReadReport(context.Context, ports.PublicationRun, domain.ProjectBinding, string, appquery.ContentContinuation) (appquery.ContentChunk, error)
ReadEvidence(context.Context, ports.PublicationRun, domain.ProjectBinding, string, string, int, appquery.ContentContinuation) (appquery.ContentChunk, error)
ReadSourceEvidence(context.Context, ports.PublicationRun, domain.ProjectBinding, string, string, int, appquery.ContentContinuation) (appquery.ContentChunk, error)
ReadSourceImage(context.Context, ports.PublicationRun, domain.ProjectBinding, string, string, string, appquery.ContentContinuation) (appquery.ContentChunk, error)
Inspect(context.Context, ports.PublicationRun, domain.ProjectBinding, appquery.InspectionRequest) (appquery.Inspection, error)
ReadFinding(context.Context, ports.PublicationRun, domain.ProjectBinding, string, appquery.ContentContinuation) (appquery.ContentChunk, error)
ResolveRun(context.Context, ports.AnchoredRoot, domain.RunID) (ports.PublicationRun, error)
ReadRunStatus(context.Context, ports.PublicationRun) (RunStatusView, 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
ArtifactRoot 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 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 ¶
RequestResolver resolves CLI-only selectors before a schema request is frozen. Implementations return canonical IDs for verified historical publications.
type RequirementsPreflightItem ¶ added in v0.1.26
type RequirementsPreflightSummary ¶ added in v0.1.26
type RequirementsPreflightSummary struct {
InputSHA256 string `json:"input_sha256"`
SelectedCount int `json:"selected_count"`
Items []RequirementsPreflightItem `json:"items"`
EvaluationStatus string `json:"evaluation_status"`
ExtractionPolicy string `json:"extraction_policy"`
SourceLimit string `json:"source_limit"`
ExecutionAvailable bool `json:"execution_available"`
}
RequirementsPreflightSummary is bounded admission metadata. It is neither a published assessment nor a content lock, and contains no requirement prose.
func NewRequirementsPreflightSummary ¶ added in v0.1.26
func NewRequirementsPreflightSummary(digest string, requirements []domain.Requirement, extraction, executionAvailable bool) (*RequirementsPreflightSummary, error)
func (RequirementsPreflightSummary) Validate ¶ added in v0.1.26
func (summary RequirementsPreflightSummary) Validate() error
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 ¶
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)
ProjectCompositeResult returns the one shared public data shape consumed by CLI structured output and MCP tool results.
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"`
CriticalPathDeadline string `json:"critical_path_deadline"`
RunDeadline string `json:"run_deadline"`
Ceilings ReviewPreflightCeilings `json:"ceilings"`
RolePaths []ReviewPreflightRolePath `json:"role_paths"`
}
type ReviewPreflightCeilings ¶ added in v0.1.2
type ReviewPreflightRead ¶ added in v0.1.25
type ReviewPreflightRead struct {
Side domain.LiveSourceSide `json:"side"`
Path string `json:"path"`
}
type ReviewPreflightResult ¶ added in v0.1.2
type ReviewPreflightResult struct {
Requirements *RequirementsPreflightSummary `json:"requirements"`
SchemaVersion string `json:"schema_version"`
Capabilities query.VerifiedReadCapabilities `json:"capabilities"`
ProjectBinding string `json:"project_binding"`
ConfigurationSHA256 string `json:"configuration_sha256"`
SourceIdentitySHA256 string `json:"source_identity_sha256"`
Target json.RawMessage `json:"target"`
CandidateCount int `json:"candidate_count"`
Status string `json:"status"`
Qualification string `json:"qualification"`
Warnings []string `json:"warnings"`
ReadPlan []ReviewPreflightRead `json:"read_plan"`
Transmissions []ReviewPreflightTransmission `json:"transmissions"`
Budget ReviewPreflightBudget `json:"budget"`
}
ReviewPreflightResult describes the current selection and configured routes. Its source identity binds selection metadata, not mutable file contents.
func NewLiveReviewPreflightResult ¶ added in v0.1.25
func NewLiveReviewPreflightResult(target ports.LiveSourceTarget, binding domain.ProjectBinding, configurationSHA256 string, reads []ports.LiveSourceRead, plan reviewrun.ExecutionPlan, budget review.RunBudgetReceipt) (ReviewPreflightResult, error)
func (ReviewPreflightResult) Validate ¶ added in v0.1.2
func (result ReviewPreflightResult) Validate() (err error)
Validate checks selection, native read sides, and the independently rebuilt route budget before exposing a successful projection.
type ReviewPreflightRolePath ¶ added in v0.1.12
type ReviewPreflightService ¶ added in v0.1.2
type ReviewPreflightService interface {
PreflightReview(context.Context, ReviewRequest, ports.AnchoredRoot) (ReviewPreflightResult, error)
}
ReviewPreflightService admits original-source selection without invoking providers or creating execution or publication state. Selected artist and requirements inputs are validated; source evidence is only listed.
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"`
}
type ReviewRequest ¶
ReviewRequest is the application-owned request projected by the CLI.
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) Guarded ¶ added in v0.1.24
func (result ReviewRunResult) Guarded() bool
func (ReviewRunResult) ProjectBinding ¶ added in v0.1.24
func (result ReviewRunResult) ProjectBinding() string
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) SourceIdentitySHA256 ¶ added in v0.1.25
func (result ReviewRunResult) SourceIdentitySHA256() string
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 NewLiveReviewRunService ¶ added in v0.1.25
func NewLiveReviewRunService(service *reviewrun.LiveService) ReviewRunService
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 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
type RoleReportURI = runstatus.RoleReportURI
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 = runstatus.PublicationStatus
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 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
}