cmd

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 61 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version information - set via ldflags at build time
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)
View Source
var ErrTooLong = errors.New("input exceeds limit")
View Source
var NAME = "conductor"

Functions

func AddOutputFlags

func AddOutputFlags(cmd *cobra.Command)

AddOutputFlags adds --json and --csv flags to a command

func BuildSkillPayload added in v0.1.6

func BuildSkillPayload(dir string, opts PayloadOptions) (SkillConfig, LocalContext, error)

BuildSkillPayload reads a local skill directory and produces its typed wire config plus the local-only context. All filesystem access stays here in the cmd layer; the returned SkillConfig is pure data ready to marshal for deploy/start.

func EscapeCSV

func EscapeCSV(value string) string

EscapeCSV escapes a string value for CSV output Handles values containing commas, quotes, or newlines

func Execute

func Execute(ctx context.Context)

func ReadLineRaw

func ReadLineRaw(limit int) (string, error)

ReadLineRaw reads from stdin in raw mode until a newline is entered (accepts both '\n' and '\r'). It supports arbitrarily long lines up to `limit`. The terminal state is always restored before returning.

Types

type BoilerPlate

type BoilerPlate struct {
	Files []BoilerPlateFile `json:"files"`
}

type BoilerPlateFile

type BoilerPlateFile struct {
	Name   string  `json:"name"`
	Fields []Field `json:"fields"`
	Mode   string  `json:"mode,omitempty"`
}

type CSVWriter

type CSVWriter struct {
	// contains filtered or unexported fields
}

CSVWriter wraps csv.Writer with helper methods

func NewCSVWriter

func NewCSVWriter() *CSVWriter

NewCSVWriter creates a new CSV writer that writes to stdout

func (*CSVWriter) Flush

func (c *CSVWriter) Flush()

Flush flushes the CSV writer

func (*CSVWriter) WriteHeader

func (c *CSVWriter) WriteHeader(headers ...string)

WriteHeader writes the CSV header row

func (*CSVWriter) WriteRow

func (c *CSVWriter) WriteRow(values ...string)

WriteRow writes a CSV data row

type CachedTokenManager

type CachedTokenManager struct {
	Key    string
	Secret string
	// contains filtered or unexported fields
}

CachedTokenManager manages authentication tokens with caching It implements the TokenManager interface from conductor-go SDK

func NewCachedTokenManager

func NewCachedTokenManager(key, secret, cachedToken string, tokenExpiry int64, configPath string, httpSettings *settings.HttpSettings) *CachedTokenManager

NewCachedTokenManager creates a new CachedTokenManager

func (*CachedTokenManager) RefreshToken

func (m *CachedTokenManager) RefreshToken(httpSettings *settings.HttpSettings, httpClient *http.Client) (string, error)

RefreshToken implements the TokenManager interface Returns a valid token, fetching a new one if the cached token is expired

type ConfigTokenManager

type ConfigTokenManager struct {
	Token string
}

func (ConfigTokenManager) RefreshToken

func (manager ConfigTokenManager) RefreshToken(httpSettings *settings.HttpSettings, httpClient *http.Client) (string, error)

type Field

type Field struct {
	Name      string `json:"name"`
	Attribute string `json:"attribute"`
	Prompt    string `json:"prompt"`
}

type Framework

type Framework struct {
	Name      string     `json:"name"`
	Templates []Template `json:"templates"`
}

type Language

type Language struct {
	Name       string      `json:"name"`
	Frameworks []Framework `json:"frameworks"`
}

type LocalContext added in v0.1.6

type LocalContext struct {
	SkillName   string
	SkillDir    string
	Sections    map[string]string       // slug → SKILL.md section body
	CrossSkills map[string]LocalContext // refName → nested local context
}

LocalContext is the never-serialized side of a built skill. It stays on the CLI side and feeds the run/serve workers: the skill name is the worker task-type prefix, SkillDir roots local file/script tools, Sections lets the read_skill_file worker serve "skill_section:{slug}" requests for large bodies, and CrossSkills carries the same context for each resolved cross-skill so their script/file workers can be started too.

type OutputFormat

type OutputFormat string

OutputFormat represents the output format type

const (
	OutputFormatTable OutputFormat = "table"
	OutputFormatJSON  OutputFormat = "json"
	OutputFormatCSV   OutputFormat = "csv"
)

func GetOutputFormat

func GetOutputFormat(cmd *cobra.Command) (OutputFormat, error)

GetOutputFormat determines the output format from command flags Returns: format, error

type ParamValue added in v0.1.6

type ParamValue struct {
	// contains filtered or unexported fields
}

ParamValue is one skill-parameter value. Skill params are scalars: a --param override parses to a bool ("true"/"false") or a string, and a SKILL.md frontmatter default carries through its parsed YAML scalar. ParamValue keeps the value typed at the wire boundary (SkillConfig holds no bare interface{} map) and both marshals to, and stringifies as, its underlying scalar.

func (ParamValue) MarshalJSON added in v0.1.6

func (p ParamValue) MarshalJSON() ([]byte, error)

MarshalJSON emits the underlying scalar.

type PayloadOptions added in v0.1.6

type PayloadOptions struct {
	Model          string
	AgentModels    map[string]string
	SearchPaths    []string
	ParamOverrides map[string]ParamValue
}

PayloadOptions carries the caller-resolved (in cmd) inputs the builder needs.

type ScriptInfo added in v0.1.6

type ScriptInfo struct {
	Filename string `json:"filename"`
	Language string `json:"language"`
}

ScriptInfo describes one discovered script tool.

type ServerUpdateState

type ServerUpdateState struct {
	LastCheck  time.Time `json:"last_check"`
	ETag       string    `json:"etag,omitempty"`
	ServerType string    `json:"server_type,omitempty"`
	Version    string    `json:"version,omitempty"`
	Port       int       `json:"port,omitempty"`
}

ServerUpdateState tracks the state of server update checks

type SkillConfig added in v0.1.6

type SkillConfig struct {
	Model          string                 `json:"model,omitempty"`
	AgentModels    map[string]string      `json:"agentModels,omitempty"`
	SkillMd        string                 `json:"skillMd"`
	AgentFiles     map[string]string      `json:"agentFiles,omitempty"`     // agentName → body
	Scripts        map[string]ScriptInfo  `json:"scripts,omitempty"`        // toolName → {filename,language}
	ResourceFiles  []string               `json:"resourceFiles,omitempty"`  // skill-relative paths
	CrossSkillRefs map[string]SkillConfig `json:"crossSkillRefs,omitempty"` // refName → nested config
	DefaultParams  map[string]ParamValue  `json:"defaultParams,omitempty"`
	Params         map[string]ParamValue  `json:"params,omitempty"`
	// Workspace is set only by the run/serve worker runtime; load never populates it.
	// The wire type is owned by skillworker (which serves the workspace tools).
	Workspace *skillworker.WorkspaceWire `json:"workspace,omitempty"`
}

SkillConfig is the server-bound skill definition. Every field is serialized to the deploy/start rawConfig; there are no local-only fields (paths and pre-split sections live in LocalContext instead), so no strip step is needed before the wire — the type is the contract.

type TaskResult

type TaskResult struct {
	Status string                 `json:"status"`
	Body   map[string]interface{} `json:"body"`
}

type Template

type Template struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Path        string `json:"path"`
}

type TemplateList

type TemplateList struct {
	Languages []Language `json:"languages"`
}

type WorkerCodeResponse

type WorkerCodeResponse struct {
	Id           string    `json:"id"`
	UserId       string    `json:"userId"`
	Namespace    string    `json:"namespace"`
	TaskName     string    `json:"taskName"`
	Language     string    `json:"language"`
	Code         string    `json:"code"`
	Version      int       `json:"version"`
	Description  string    `json:"description"`
	Dependencies []string  `json:"dependencies"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
	CreatedBy    string    `json:"createdBy"`
}

WorkerCodeResponse represents the response from the job-runner worker-code API

type WorkerMetadata

type WorkerMetadata struct {
	TaskName     string    `json:"taskName"`
	Language     string    `json:"language"`
	Version      int       `json:"version"`
	WorkerCodeId string    `json:"workerCodeId"`
	CachedAt     time.Time `json:"cachedAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
}

WorkerMetadata represents cached worker metadata

type WorkerResult

type WorkerResult struct {
	Status string                 `json:"status"` // COMPLETED | FAILED | IN_PROGRESS
	Output map[string]interface{} `json:"output,omitempty"`
	Logs   []string               `json:"logs,omitempty"`
	Reason string                 `json:"reason,omitempty"`
}

WorkerResult represents the expected output from a worker command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL