Documentation
¶
Index ¶
- type API
- func (api *API) BackfillWorkflowIDs(ctx context.Context) error
- func (api *API) Compose(ctx context.Context, requester interface{}, request *ComposeRequest) (*ComposeResponse, error)
- func (api *API) Create(ctx context.Context, requester interface{}, request *CreateRequest) (*CreateResponse, error)
- func (api *API) DefaultProjectDir() string
- func (api *API) Delete(ctx context.Context, requester interface{}, request *DeleteRequest) (*DeleteResponse, error)
- func (api *API) DeleteDraft(ctx context.Context, requester interface{}, request *DeleteDraftRequest) (*DeleteDraftResponse, error)
- func (api *API) Get(ctx context.Context, requester interface{}, request *GetRequest) (*GetResponse, error)
- func (api *API) List(ctx context.Context, requester interface{}, request *ListRequest) (*ListResponse, error)
- func (api *API) Rename(ctx context.Context, requester interface{}, request *RenameRequest) (*RenameResponse, error)
- func (api *API) SaveDraft(ctx context.Context, requester interface{}, request *SaveDraftRequest) (*SaveDraftResponse, error)
- func (api *API) UpdateNode(ctx context.Context, requester interface{}, request *UpdateNodeRequest) (*UpdateNodeResponse, error)
- type ComposeRequest
- type ComposeResponse
- type CreateRequest
- type CreateResponse
- type DeleteDraftRequest
- type DeleteDraftResponse
- type DeleteRequest
- type DeleteResponse
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type RenameRequest
- type RenameResponse
- type SaveDraftRequest
- type SaveDraftResponse
- type UpdateNodeRequest
- type UpdateNodeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Executions *executions.API
NodeExecutions *nodeexecutions.API
Conversations *conversations.API
Worktrees *worktrees.API
Registry *workflowruntime.Registry
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(ctrl *controller.Controller, rt *runtime.Runtime) *API
func (*API) BackfillWorkflowIDs ¶
BackfillWorkflowIDs links past runs to each installed workflow's permanent id. Idempotent — runs at startup so history recorded before a workflow was imported (e.g. from --file runs) still keys on it.
func (*API) Compose ¶
func (api *API) Compose(ctx context.Context, requester interface{}, request *ComposeRequest) (*ComposeResponse, error)
func (*API) Create ¶
func (api *API) Create(ctx context.Context, requester interface{}, request *CreateRequest) (*CreateResponse, error)
Create scaffolds a new named workflow as a draft — nothing lands in the registry until it is saved.
func (*API) DefaultProjectDir ¶
DefaultProjectDir returns the effective default working directory used when a run does not specify a project. An empty configured value resolves to the server's current working directory, always returned as an absolute path.
func (*API) Delete ¶
func (api *API) Delete(ctx context.Context, requester interface{}, request *DeleteRequest) (*DeleteResponse, error)
Delete removes a workflow from the library only — its run history and version archive stay untouched.
func (*API) DeleteDraft ¶
func (api *API) DeleteDraft(ctx context.Context, requester interface{}, request *DeleteDraftRequest) (*DeleteDraftResponse, error)
func (*API) Get ¶
func (api *API) Get(ctx context.Context, requester interface{}, request *GetRequest) (*GetResponse, error)
func (*API) List ¶
func (api *API) List(ctx context.Context, requester interface{}, request *ListRequest) (*ListResponse, error)
func (*API) Rename ¶
func (api *API) Rename(ctx context.Context, requester interface{}, request *RenameRequest) (*RenameResponse, error)
Rename edits a workflow's identity: id, display name, and/or description. An id change cascades: registry file, draft, versions archive, embedding specs, and the run history rows that key Monitor's views.
func (*API) SaveDraft ¶
func (api *API) SaveDraft(ctx context.Context, requester interface{}, request *SaveDraftRequest) (*SaveDraftResponse, error)
func (*API) UpdateNode ¶
func (api *API) UpdateNode(ctx context.Context, requester interface{}, request *UpdateNodeRequest) (*UpdateNodeResponse, error)
type ComposeRequest ¶
type ComposeRequest struct {
// WorkflowSlug is empty when the request should create a workflow.
WorkflowSlug string `json:"workflow_slug"`
Request string `json:"request"`
// Harness, Model, and ReasoningEffort override the settings
// choice for this call only — empty means "use the configured
// default" (medium, for the effort).
Harness string `json:"harness"`
Model string `json:"model"`
ReasoningEffort string `json:"reasoning_effort"`
}
func (*ComposeRequest) Validate ¶
func (r *ComposeRequest) Validate() error
type ComposeResponse ¶
type ComposeResponse struct {
WorkflowSlug string `json:"workflow_slug"`
Action string `json:"action"`
Summary string `json:"summary"`
Harness string `json:"harness"`
Model string `json:"model"`
ReasoningEffort string `json:"reasoning_effort"`
// Draft is the proposed spec now waiting for Save — empty
// when the composer proposed nothing.
Draft string `json:"draft,omitempty"`
}
type CreateRequest ¶
type CreateRequest struct {
Name string `json:"name"`
Description string `json:"description"`
// WorkflowSlug overrides the id derived from the name.
WorkflowSlug string `json:"workflow_slug"`
}
func (*CreateRequest) Validate ¶
func (r *CreateRequest) Validate() error
type CreateResponse ¶
type DeleteDraftRequest ¶
type DeleteDraftRequest struct {
WorkflowSlug string `json:"workflow_slug"`
}
func (*DeleteDraftRequest) Validate ¶
func (r *DeleteDraftRequest) Validate() error
type DeleteDraftResponse ¶
type DeleteRequest ¶
type DeleteRequest struct {
WorkflowSlug string `json:"workflow_slug"`
}
func (*DeleteRequest) Validate ¶
func (r *DeleteRequest) Validate() error
type DeleteResponse ¶
type GetRequest ¶
type GetRequest struct {
WorkflowSlug string `json:"workflow_slug"`
}
func (*GetRequest) Validate ¶
func (r *GetRequest) Validate() error
type GetResponse ¶
type ListRequest ¶
type ListRequest struct{}
func (*ListRequest) Validate ¶
func (r *ListRequest) Validate() error
type ListResponse ¶
type ListResponse struct {
Workflows []workflowruntime.WorkflowSummary `json:"workflows"`
}
type RenameRequest ¶
type RenameRequest struct {
WorkflowSlug string `json:"workflow_slug"`
// NewID moves the workflow to a new id; empty keeps the current.
NewID string `json:"new_id"`
// Name sets the display name; empty keeps the current.
Name string `json:"name"`
// Description sets the description; nil keeps the current, ""
// clears it.
Description *string `json:"description,omitempty"`
}
func (*RenameRequest) Validate ¶
func (r *RenameRequest) Validate() error
type RenameResponse ¶
type SaveDraftRequest ¶
type SaveDraftRequest struct {
WorkflowSlug string `json:"workflow_slug"`
}
func (*SaveDraftRequest) Validate ¶
func (r *SaveDraftRequest) Validate() error
type SaveDraftResponse ¶
type UpdateNodeRequest ¶
type UpdateNodeRequest struct {
WorkflowSlug string `json:"workflow_slug"`
Node string `json:"node"`
// nil fields are left unchanged.
Model *string `json:"model,omitempty"`
Harness *string `json:"harness,omitempty"`
Instruction *string `json:"instruction,omitempty"`
// "" resets to the harness default.
ReasoningEffort *string `json:"reasoning_effort,omitempty"`
// "" resets to the compiler default (read_only).
Permissions *string `json:"permissions,omitempty"`
}
func (*UpdateNodeRequest) Validate ¶
func (r *UpdateNodeRequest) Validate() error