feat(designer): Agentic Workflow Designer#18
Merged
Conversation
…r.ts resolveModelRouting (gateway/format resolution incl. tools->Responses promotion), executeToolCore (headless load_skill/builtin/MCP dispatch), and capToolResult move to src/agent-runner.ts so the upcoming workflow engine can reuse them. getAllToolDefs gains an optional allowlist param (narrowing only) for per-cell tool selection; renderQuestionCard gains an optional container. Chat behavior unchanged. Co-authored-by: Isaac
Visual node-based workflow designer (sidebar button above Profile, Cmd+D). Cells select a model + per-cell tool subset + prompt; flow edges pipe outputs downstream with labeled multi-input joins; dashed feedback edges create bounded revision loops driven by a forced route_output verdict tool on gate cells. Sequential execution through the existing chat IPC; budgets (40 inner / 5 feedback / 25 global) guard against runaway loops. Workflows persist to ~/.mason/workflows. Includes the Spec → Implement → Test → Review template. Co-authored-by: Isaac
…e pressure Loops were already bounded (5 revisions per cell, 25 cell runs global, gatekeeper forces a terminal route on exhaustion) but invisibly so. Now: feedback-target cells show an editable revision cap (1-20) on the card; status pills show loop progress (running 3/5); gates see 'revision N of M' annotations on revised inputs plus per-route budget state and an explicit don't-chase-perfection instruction. Verified against a critic prompted to never be satisfied: forced to route end after the cap, 4 cell runs. Co-authored-by: Isaac
Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Agentic Workflow Designer — a visual, node-based canvas (n8n-style) for composing multi-model agentic pipelines, per the engineering spec in
docs/specs/agentic-workflow-designer.md(included in this PR).What's in it
Designer UI (
src/designer.ts, hand-rolled DOM + SVG — no new deps)Cmd+D) swaps the chat pane for a pannable/zoomable dot-grid canvasEngine (
src/workflow-engine.ts)## Input from "spec"sections); fan-out/fan-inroute_outputtool (enum of outgoing edges +end) — works on every tool-capable Gateway model, no JSON-in-prose parsingPhase 0 refactor (
src/agent-runner.ts)resolveModelRouting+executeToolCore+capToolResultextracted fromchat.tsso chat and the engine share one implementation;getAllToolDefs(allowlist?)for per-cell narrowing. Chat behavior unchanged.Persistence:
~/.mason/workflows/<id>.jsonvia 4 new IPC handlers (mirrors chat history; atomic temp+rename writes, id sanitization). Autosave every 10s.Verified
tscstrict typecheck cleanend; 4 cell runs, correct statuses/verdicts/transcriptsTest plan
npm start→ Workflow Designer button above Profile opens the canvas