23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
header('Access-Control-Allow-Origin: *');
|
|
$action = $_GET['action'] ?? 'list';
|
|
|
|
switch ($action) {
|
|
case 'list':
|
|
echo json_encode(['ok' => true, 'workflows' => [
|
|
['id' => 'email-qa', 'name' => 'Email Quality Analyzer', 'status' => 'active', 'type' => 'chain'],
|
|
['id' => 'content-gen', 'name' => 'Multi-Lang Content Generator', 'status' => 'active', 'type' => 'rag'],
|
|
['id' => 'lead-score', 'name' => 'Lead Scoring Pipeline', 'status' => 'active', 'type' => 'agent'],
|
|
['id' => 'sec-audit', 'name' => 'Security Audit Chain', 'status' => 'active', 'type' => 'chain'],
|
|
['id' => 'data-enrich', 'name' => 'Contact Data Enrichment', 'status' => 'active', 'type' => 'rag'],
|
|
], 'engine' => 'Dify SDK', 'total' => 5]);
|
|
break;
|
|
case 'run':
|
|
$wf = $_GET['workflow'] ?? '';
|
|
echo json_encode(['ok' => true, 'workflow' => $wf, 'status' => 'queued', 'engine' => 'Dify']);
|
|
break;
|
|
default:
|
|
echo json_encode(['error' => 'action: list|run']);
|
|
}
|