workflow

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 16 Imported by: 0

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

View Source
const Key = "workflow"

Variables

This section is empty.

Functions

func Meta

func Meta() connector.Meta

Meta returns the static metadata block.

func Module

func Module(ops *wfmcp.Ops) connector.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

func ModuleWithRunner(ops *wfmcp.Ops, runner *wftest.Runner) connector.Module

ModuleWithRunner is like Module but also wires a wftest.Runner so the workflow_test and workflow_test_coverage ops are functional.

func Operations

func Operations(ops *wfmcp.Ops, runner *wftest.Runner) []connector.Category

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

type WorkflowOwnership interface {
	RegisterOwner(ctx context.Context, userID, workflowID string)
}

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.

Jump to

Keyboard shortcuts

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