Remove Perigon News integration and related SDK components

The Perigon News integration, SDK, and associated tools were removed from the repository. This includes the agent script, API SDK, and OpenAPI definitions for managing news-related operations. The changes simplify the codebase, eliminating unused or outdated dependencies.
This commit is contained in:
geoffsee
2025-05-27 13:11:52 -04:00
parent 8f4777a006
commit 2c46e7b2fc
11 changed files with 9 additions and 1812 deletions

View File

@@ -22,7 +22,7 @@ lazy_static! {
));
}
pub async fn handle_webhooks(Path(agent_id): Path<String>) -> impl IntoResponse {
pub async fn use_agent(Path(agent_id): Path<String>) -> impl IntoResponse {
let db = DB.lock().await;
match db.get(&agent_id) {
Ok(Some(data)) => {
@@ -194,7 +194,7 @@ struct WebhookPostResponse {
stream_url: String,
}
pub async fn handle_webhooks_post(Json(payload): Json<WebhookPostRequest>) -> impl IntoResponse {
pub async fn create_agent(Json(payload): Json<WebhookPostRequest>) -> impl IntoResponse {
let db = DB.lock().await;
tracing::info!("Received webhook post request with ID: {}", payload.id);

View File

@@ -1,5 +1,3 @@
// src/handlers/mod.rs
pub mod not_found;
pub mod ui;
pub mod webhooks;
pub mod agents;

View File

@@ -1,5 +1,5 @@
use crate::handlers::webhooks::handle_webhooks_post;
use crate::handlers::{not_found::handle_not_found, ui::serve_ui, webhooks::handle_webhooks};
use crate::handlers::agents::create_agent;
use crate::handlers::{not_found::handle_not_found, ui::serve_ui, agents::use_agent};
use axum::routing::post;
use axum::routing::{get, Router};
use tower_http::trace::{self, TraceLayer};
@@ -9,9 +9,9 @@ pub fn create_router() -> Router {
Router::new()
.route("/", get(serve_ui))
// create an agent
.route("/api/agents", post(handle_webhooks_post))
.route("/api/agents", post(create_agent))
// connect the agent
.route("/agents/:agent_id", get(handle_webhooks))
.route("/agents/:agent_id", get(use_agent))
.route("/health", get(health))
.layer(
TraceLayer::new_for_http()