Documentation
¶
Overview ¶
Package workflow exposes the workflow engine as a fixed single-instance MCP connector. Every op in §9 of the workflow design (Tier 1/2/3) is reachable via wick_execute so any AI with MCP access — Claude Desktop, ChatGPT plugin, Gemini — can create, edit, test, and run workflows without needing native file access.
File layout:
- connector.go — Meta, Configs, Input structs, Operations, thin handlers
- ops.go — handler implementations that delegate to mcp.Ops
Wire-up: call workflow.Module(ops) and pass the result to connectors.Register(...) before connectors.Service.Bootstrap. The mcp.Ops pointer is obtained from the workflow bootstrap (internal/agents/workflow/). Use workflow.ModuleWithRunner(ops, runner) to also enable the workflow_test / workflow_test_coverage ops.
AI usage pattern (no file access):
workflow_workspace → workflow_node_types → workflow_create → workflow_add_node → workflow_connect → workflow_validate → workflow_simulate → workflow_test → workflow_request_review
Index ¶
- Constants
- func Meta() connector.Meta
- func Module(ops *wfmcp.Ops) connector.Module
- func ModuleWithRunner(ops *wfmcp.Ops, runner *wftest.Runner) connector.Module
- func Operations(ops *wfmcp.Ops, runner *wftest.Runner) []connector.Category
- func SetWorkflowOwnership(o WorkflowOwnership)
- type Configs
- type WorkflowOwnership
Constants ¶
const Key = "workflow"
Variables ¶
This section is empty.
Functions ¶
func Module ¶
Module returns the fully-wired connector.Module for the given ops. Call connectors.Register(workflow.Module(ops)) at boot before connectors.Service.Bootstrap runs. The workflow_test / workflow_test_coverage ops return an error when no runner is wired — use ModuleWithRunner to enable.
func ModuleWithRunner ¶
ModuleWithRunner is like Module but also wires a wftest.Runner so the workflow_test and workflow_test_coverage ops are functional.
func Operations ¶
Operations builds the full op list, capturing ops + runner so every handler can reach the workflow engine.
func SetWorkflowOwnership ¶ added in v1.2.9
func SetWorkflowOwnership(o WorkflowOwnership)
SetWorkflowOwnership wires the owner recorder. Called once at boot.
Types ¶
type Configs ¶
type Configs struct{}
Configs is intentionally empty — the connector talks to the in-process workflow engine, not an external API.
type WorkflowOwnership ¶ added in v1.2.9
WorkflowOwnership records the human a workflow belongs to, so a workflow an agent creates on someone's behalf is reachable by that person instead of only by admins. Implemented by the API layer over the owner:<id> tag; nil when unwired (tests, file-store installs), which just skips the step.