Documentation
¶
Overview ¶
Package workflows stages project workflows and plugin skills onto targets.
Workflows are plugin contributions: the bundled ones (Spec Kit, Maestro, Delegated build) come from the binary's own plugins in internal/pluginpkg, installed plugins add more through internal/plugins. The source files are copied to the target only when an operator enables a workflow. The target copy is versioned and immutable: a later enable verifies existing bytes instead of replacing them.
Index ¶
- func SourceDigest(files []File) string
- func Stage(ctx context.Context, ex executor.Executor, id string) (string, string, error)
- func StageFiles(ctx context.Context, ex executor.Executor, root string, files []File) error
- func StageSource(ctx context.Context, ex executor.Executor, src Source) (string, string, error)
- func TargetHome(ctx context.Context, ex executor.Executor) (string, error)
- type Definition
- type File
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SourceDigest ¶
func StageFiles ¶ added in v2.6.0
StageFiles writes files under root on the target, verifying rather than replacing anything already there.
func StageSource ¶ added in v2.6.0
StageSource copies a workflow or skill to a target-local immutable version path, ~/.lectern/workflows/<id>/<version>-<digest>. It uses only Executor.Run, so SSH targets execute the same checks remotely and bytes never land in the Lectern control-plane filesystem.
Types ¶
type Definition ¶
type Definition struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
UpstreamURL string `json:"upstream_url"`
Commands []string `json:"commands"`
// Kind is "workflow", or "skill" for a plugin skill: a workflow with no
// commands, enabled the same way.
Kind string `json:"kind,omitempty"`
// PluginID is the plugin that contributes it; Entry is the skill
// directory it becomes in the project.
PluginID string `json:"plugin_id,omitempty"`
Entry string `json:"entry,omitempty"`
// Bundled marks the binary's own workflows, whose ids and attachment
// records predate plugins and are kept exactly.
Bundled bool `json:"bundled,omitempty"`
}
func DefinitionFor ¶
func DefinitionFor(id string) (Definition, bool)
func Definitions ¶
func Definitions() []Definition
Definitions lists the bundled workflows. Installed plugins add theirs through internal/plugins.
type Source ¶ added in v2.6.0
type Source struct {
Definition
Files []File
}
Source is a workflow with the files it stages.
func FromPlugin ¶ added in v2.6.0
FromPlugin lists a plugin's workflows and skills as sources. A bundled plugin's workflows keep their bare ids (spec-kit, maestro, delegate) so existing project attachments still match; any other plugin's are namespaced "<plugin id>:<id>".