Wire native pipeline run commands and invocation-wide overrides

This commit is contained in:
2026-11-22 03:51:08 +00:00
parent 2a9c5a6075
commit 0cbc2b39cb
19 changed files with 1529 additions and 1344 deletions

View File

@@ -15,6 +15,7 @@ import (
// NewApplication declares the native command surface. Acquisition is deferred to
// the selected handler; construction performs no configuration or engine work.
func NewApplication(version string, options Options) (*commandkit.App, error) {
options = defaultOptions(options)
newState := func() *nativeLoaders {
state := &nativeLoaders{lookupEnv: options.LookupEnv, runtime: options.LLMRuntime}
if options.LLMClient != nil {
@@ -41,7 +42,8 @@ func NewApplication(version string, options Options) (*commandkit.App, error) {
definitions = ckprompt.WithNamespaces(definitions, promptkit.Namespaces{})
declarations := []commandkit.Declaration{
commandkit.Completion("notarius"),
pipelineCommands(newState, func() (pipeline.ModuleCatalog, error) { return effectiveCatalog(options) }),
pipelineCommands(newState, func() (pipeline.ModuleCatalog, error) { return effectiveCatalog(options) }, pipelineRunCommand(version, newState, func() (pipeline.Registries, error) { return effectiveRegistries(options) }, options)),
commandkit.Alias("run", "pipeline run"),
ckconfig.Command(ckconfig.Suite[struct{}, *nativeLoaders]{
NewState: newState,
CheckInput: func(_ string, selection ckconfig.Selection, _ struct{}) error {