Browse Source

feat(31-01): define WorkflowProposal types for reviewable workflow structure

Add types for the workflow proposal system:
- ProposedNode: node with purpose, title, and suggested settings
- ProposedConnection: connection with human-readable description
- ProposedGroup: optional grouping with purpose description
- WorkflowProposal: complete reviewable workflow structure

These types enable the LLM to propose workflow structure before
generating full workflow JSON, allowing user review and editing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 6 months ago
parent
commit
602130a18b
  1. 80
      src/types/quickstart.ts

80
src/types/quickstart.ts

@ -1,3 +1,5 @@
import type { NodeType } from "./nodes";
export type QuickstartView = "initial" | "templates" | "vibe";
export type TemplateCategory = "simple" | "advanced" | "community";
@ -22,3 +24,81 @@ export interface CommunityWorkflowMeta {
hoverImage?: string;
sortOrder?: number;
}
// ============================================================================
// Workflow Proposal Types
// ============================================================================
/**
* A proposed node in the workflow - describes purpose and configuration
* without internal state or positioning details
*/
export interface ProposedNode {
/** Temporary ID like "node-1" */
id: string;
/** Node type: imageInput, prompt, nanoBanana, etc. */
type: NodeType;
/** Human-readable description of this node's role */
purpose: string;
/** customTitle for the node */
suggestedTitle: string;
/** For prompt nodes: the suggested prompt text */
suggestedPrompt?: string;
/** For nanoBanana/generateVideo: the suggested model */
suggestedModel?: string;
/** For nanoBanana/generateVideo: suggested settings like aspectRatio */
suggestedSettings?: Record<string, unknown>;
}
/**
* A proposed connection between nodes - describes data flow
*/
export interface ProposedConnection {
/** Source node ID */
from: string;
/** Target node ID */
to: string;
/** Connection type */
type: "image" | "text" | "reference";
/** Human-readable description of data flow */
description: string;
}
/**
* A proposed group for organizing related nodes
*/
export interface ProposedGroup {
/** Group name */
name: string;
/** Group color */
color: "neutral" | "blue" | "green" | "purple" | "orange";
/** IDs of nodes in this group */
nodeIds: string[];
/** Human-readable description of what this group represents */
purpose: string;
}
/**
* Workflow complexity estimate
*/
export type WorkflowComplexity = "simple" | "moderate" | "complex";
/**
* A complete workflow proposal - reviewable structure before JSON generation
*/
export interface WorkflowProposal {
/** Workflow name */
name: string;
/** One-paragraph summary of what workflow does */
description: string;
/** Proposed nodes */
nodes: ProposedNode[];
/** Proposed connections */
connections: ProposedConnection[];
/** Optional groups for organizing nodes */
groups?: ProposedGroup[];
/** Estimated complexity */
estimatedComplexity: WorkflowComplexity;
/** Any caveats or limitations */
warnings?: string[];
}

Loading…
Cancel
Save