Documentation
¶
Index ¶
- Variables
- func AddOutputFlags(cmd *cobra.Command)
- func BuildSkillPayload(dir string, opts PayloadOptions) (SkillConfig, LocalContext, error)
- func EscapeCSV(value string) string
- func Execute(ctx context.Context)
- func ReadLineRaw(limit int) (string, error)
- type BoilerPlate
- type BoilerPlateFile
- type CSVWriter
- type CachedTokenManager
- type ConfigTokenManager
- type Field
- type Framework
- type Language
- type LocalContext
- type OutputFormat
- type ParamValue
- type PayloadOptions
- type ScriptInfo
- type ServerUpdateState
- type SkillConfig
- type TaskResult
- type Template
- type TemplateList
- type WorkerCodeResponse
- type WorkerMetadata
- type WorkerResult
Constants ¶
This section is empty.
Variables ¶
var ( // Version information - set via ldflags at build time Version = "dev" Commit = "none" Date = "unknown" )
var ErrTooLong = errors.New("input exceeds limit")
var NAME = "conductor"
Functions ¶
func AddOutputFlags ¶
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 ¶
EscapeCSV escapes a string value for CSV output Handles values containing commas, quotes, or newlines
func ReadLineRaw ¶
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 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) WriteHeader ¶
WriteHeader writes the CSV header 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 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
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 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
Source Files
¶
- agent.go
- agent_stream.go
- api_gateway.go
- cached_token_manager.go
- code.go
- config.go
- deploy.go
- doctor.go
- output.go
- root.go
- scheduler.go
- secret.go
- server.go
- server_detect.go
- skill.go
- skill_load.go
- skill_materialize.go
- skill_payload.go
- skill_register.go
- skill_run.go
- task.go
- token_manager.go
- token_validation.go
- transport.go
- update.go
- webhook_metadata.go
- whoami.go
- worker.go
- workflow.go