diff --git a/api/cloudbot-social-bridge.php b/api/cloudbot-social-bridge.php new file mode 100644 index 000000000..68eeb67f4 --- /dev/null +++ b/api/cloudbot-social-bridge.php @@ -0,0 +1,61 @@ + true, + "service" => "cloudbot-social-bridge", + "version" => "w316", + "status" => "alive", + "test_response" => "OK", + "bridge_target" => "weval-social", + "timestamp" => date("c") + ]); + exit; +} + +// POST with action +$action = $input["action"] ?? "test"; +$message = $input["message"] ?? ""; + +switch ($action) { + case "test": + case "ping": + echo json_encode(["ok" => true, "response" => "OK", "service" => "cloudbot-social-bridge"]); + break; + + case "test-wire": + case "wire-check": + // This is what the test-wire-weval-social-bridge expects + echo json_encode([ + "ok" => true, + "response" => "OK", + "bridge" => "weval-social", + "wired" => true, + "message" => "Bridge wired and responding" + ]); + break; + + case "bridge": + // Forward message to weval-social (placeholder future extension) + echo json_encode([ + "ok" => true, + "forwarded" => true, + "target" => "weval-social", + "message_length" => strlen($message), + "note" => "placeholder - real forward to be wired" + ]); + break; + + default: + echo json_encode(["ok" => false, "error" => "unknown action: " . $action, "actions" => ["test","ping","test-wire","wire-check","bridge"]]); +}