Improve workflow UI, retain stage diffs, and add portable pipeline transfers
Make OpenCode authoring responsive and expand the managed skill references. Add conflict-aware import/export, real-provider reference workflows, and tracked V2 generation for reliable budget accounting.
This commit is contained in:
+33
-3
@@ -31,6 +31,9 @@ type App struct {
|
||||
}
|
||||
type options struct {
|
||||
url, name, prompt, template, workspace, paths, key, opencode, model string
|
||||
output string
|
||||
conflict string
|
||||
all bool
|
||||
json, source, noOpen, yes, allow, createOnly, force, wait bool
|
||||
version, expected int
|
||||
timeout time.Duration
|
||||
@@ -61,6 +64,14 @@ func (a App) flags(command string) (*flag.FlagSet, *options) {
|
||||
}
|
||||
case "show", "export", "versions":
|
||||
f.IntVar(&o.version, "version", 0, "Immutable version (0 = latest)")
|
||||
if command == "export" {
|
||||
f.StringVar(&o.output, "output", "", "Save selected definitions as a ZIP bundle")
|
||||
f.BoolVar(&o.all, "all", false, "Export all pipelines without selection")
|
||||
}
|
||||
case "import":
|
||||
f.StringVar(&o.conflict, "on-conflict", "ask", "Different existing definitions: ask, keep, both, or import")
|
||||
f.BoolVar(&o.all, "all", false, "Select every pipeline in the bundle")
|
||||
f.BoolVar(&o.yes, "yes", false, "Confirm publication (schedules may activate)")
|
||||
case "template":
|
||||
f.BoolVar(&o.source, "source", false, "Print original Markdown instead of metadata")
|
||||
case "submit":
|
||||
@@ -560,7 +571,10 @@ func (a App) Run(ctx context.Context, args []string) error {
|
||||
}
|
||||
}
|
||||
return nil
|
||||
case "show", "versions", "export":
|
||||
case "export":
|
||||
if len(f.Args()) != 1 || o.output != "" || o.all {
|
||||
return a.exportBundle(ctx, o, f.Args(), call, resolve)
|
||||
}
|
||||
value, err := one()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -576,10 +590,26 @@ func (a App) Run(ctx context.Context, args []string) error {
|
||||
if r.Detail == nil {
|
||||
return fmt.Errorf("missing pipeline detail")
|
||||
}
|
||||
if command == "export" {
|
||||
_, err = fmt.Fprint(a.Out, r.Detail.Source)
|
||||
_, err = fmt.Fprint(a.Out, r.Detail.Source)
|
||||
return err
|
||||
case "import":
|
||||
return a.importBundle(ctx, o, f.Args(), call)
|
||||
case "show", "versions":
|
||||
value, err := one()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p, err := resolve(value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r, err := call(protocol.Message{Type: protocol.GetPipeline, PipelineID: p.ID, Version: o.version})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if r.Detail == nil {
|
||||
return fmt.Errorf("missing pipeline detail")
|
||||
}
|
||||
if command == "versions" {
|
||||
if o.json {
|
||||
return a.output(r.Detail.Versions)
|
||||
|
||||
Reference in New Issue
Block a user