- Create new dss/ Python package at project root - Move MCP core from tools/dss_mcp/ to dss/mcp/ - Move storage layer from tools/storage/ to dss/storage/ - Move domain logic from dss-mvp1/dss/ to dss/ - Move services from tools/api/services/ to dss/services/ - Move API server to apps/api/ - Move CLI to apps/cli/ - Move Storybook assets to storybook/ - Create unified dss/__init__.py with comprehensive exports - Merge configuration into dss/settings.py (Pydantic-based) - Create pyproject.toml for proper package management - Update startup scripts for new paths - Remove old tools/ and dss-mvp1/ directories Architecture changes: - DSS is now MCP-first with 40+ tools for Claude Code - Clean imports: from dss import Projects, Components, FigmaToolSuite - No more sys.path.insert() hacking - apps/ contains thin application wrappers (API, CLI) - Single unified Python package for all DSS logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
71 lines
2.0 KiB
Python
71 lines
2.0 KiB
Python
"""
|
|
DSS Workflow Orchestration Tools
|
|
|
|
(This file has been modified to remove the AI orchestration logic
|
|
as per user request. The original file contained complex, multi-step
|
|
workflows that have now been stubbed out.)
|
|
"""
|
|
|
|
import json
|
|
from typing import Dict, Any, List, Optional
|
|
from datetime import datetime
|
|
from mcp import types
|
|
|
|
from ..audit import AuditLog, AuditEventType
|
|
|
|
|
|
# Workflow tool definitions
|
|
WORKFLOW_TOOLS = [
|
|
types.Tool(
|
|
name="dss_workflow_status",
|
|
description="Get status of a running workflow execution",
|
|
inputSchema={
|
|
"type": "object",
|
|
"properties": {
|
|
"workflow_id": {
|
|
"type": "string",
|
|
"description": "Workflow execution ID"
|
|
}
|
|
},
|
|
"required": ["workflow_id"]
|
|
}
|
|
)
|
|
]
|
|
|
|
|
|
class WorkflowOrchestrator:
|
|
"""
|
|
(This class has been stubbed out.)
|
|
"""
|
|
|
|
def __init__(self, audit_log: AuditLog):
|
|
self.audit_log = audit_log
|
|
self.active_workflows = {} # workflow_id -> state
|
|
|
|
def get_workflow_status(self, workflow_id: str) -> Dict[str, Any]:
|
|
"""Get current status of a workflow"""
|
|
workflow = self.active_workflows.get(workflow_id)
|
|
if not workflow:
|
|
return {"error": "Workflow not found", "workflow_id": workflow_id}
|
|
|
|
return {
|
|
"workflow_id": workflow_id,
|
|
"status": "No active workflows.",
|
|
}
|
|
|
|
|
|
# Handler class that MCP server will use
|
|
class WorkflowTools:
|
|
"""Handler for workflow orchestration tools"""
|
|
|
|
def __init__(self, audit_log: AuditLog):
|
|
self.orchestrator = WorkflowOrchestrator(audit_log)
|
|
|
|
async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Route tool calls to appropriate handlers"""
|
|
|
|
if tool_name == "dss_workflow_status":
|
|
return self.orchestrator.get_workflow_status(arguments["workflow_id"])
|
|
|
|
else:
|
|
return {"error": f"Unknown or deprecated workflow tool: {tool_name}"} |