2026-08-09 23:47:38 +00:00
|
|
|
// Package notarius declares the adapter contract for Notarius CLI invocations.
|
|
|
|
|
package notarius
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"time"
|
2026-09-16 14:27:06 +00:00
|
|
|
|
2026-11-17 21:59:19 +00:00
|
|
|
configkit "go.maximumdirect.net/configkit"
|
2026-08-09 23:47:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Runner is the adapter boundary for a complete Notarius pipeline invocation.
|
|
|
|
|
type Runner interface {
|
|
|
|
|
Run(ctx context.Context, req RunRequest) (RunResult, error)
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-29 15:16:06 +00:00
|
|
|
// ReferenceBinding maps one normalized Notarius selector to an absolute
|
|
|
|
|
// external reference path.
|
|
|
|
|
type ReferenceBinding struct {
|
|
|
|
|
Selector string
|
|
|
|
|
Path string
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-09 23:47:38 +00:00
|
|
|
// RunRequest contains the resolved inputs and diagnostic destinations for one invocation.
|
|
|
|
|
type RunRequest struct {
|
2026-09-16 14:27:06 +00:00
|
|
|
Binary string
|
2026-09-25 15:33:46 +00:00
|
|
|
// Credentials are already-resolved environment references selected for Notarius.
|
|
|
|
|
Credentials []configkit.Secret
|
2026-09-28 03:09:55 +00:00
|
|
|
ConfigOverlay *string
|
2026-08-09 23:47:38 +00:00
|
|
|
ConfigPath string
|
|
|
|
|
PipelineID string
|
|
|
|
|
InputPath string
|
|
|
|
|
OutputRoot string
|
|
|
|
|
WorkingDirectory string
|
2026-11-30 02:20:09 +00:00
|
|
|
ReportPath string
|
2026-08-09 23:47:38 +00:00
|
|
|
LogPath string
|
|
|
|
|
Timeout time.Duration
|
2026-11-30 00:48:14 +00:00
|
|
|
Cache *string
|
|
|
|
|
Debug bool
|
|
|
|
|
DebugDirectory string
|
2026-08-29 15:16:06 +00:00
|
|
|
References []ReferenceBinding
|
2026-08-09 23:47:38 +00:00
|
|
|
}
|
|
|
|
|
|
2026-11-30 02:20:09 +00:00
|
|
|
// RunResult describes a successfully decoded native completion.
|
2026-08-09 23:47:38 +00:00
|
|
|
type RunResult struct {
|
2026-11-30 02:20:09 +00:00
|
|
|
Report CompletionReport
|
|
|
|
|
BundleRoot string
|
|
|
|
|
ReportPath string
|
|
|
|
|
LogPath string
|
|
|
|
|
ExitCode int
|
|
|
|
|
Duration time.Duration
|
2026-08-09 23:47:38 +00:00
|
|
|
}
|
2026-11-30 00:48:14 +00:00
|
|
|
|
|
|
|
|
// CompletionReport contains facts reported by a successfully completed run.
|
|
|
|
|
type CompletionReport struct {
|
|
|
|
|
Pipeline string
|
|
|
|
|
ArtifactCount int
|
|
|
|
|
OutputDirectory string
|
|
|
|
|
DebugDirectory string
|
|
|
|
|
FallbackCount int
|
|
|
|
|
}
|