summaryrefslogtreecommitdiff
path: root/makima/src/server/mod.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-07 01:11:26 +0000
committersoryu <soryu@soryu.co>2026-02-07 01:11:26 +0000
commit9e9f18884c78c21f5785908fb7ccd00e2fa5436b (patch)
treef2ca7c2a3db5350186282ae0be0e539aa77c0320 /makima/src/server/mod.rs
parentb8d563d45f14a2b1db1f684aa0a8dcd7e5b6ad56 (diff)
downloadsoryu-9e9f18884c78c21f5785908fb7ccd00e2fa5436b.tar.gz
soryu-9e9f18884c78c21f5785908fb7ccd00e2fa5436b.zip
Add new directive initial implementation
Diffstat (limited to 'makima/src/server/mod.rs')
-rw-r--r--makima/src/server/mod.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs
index b7a4156..a429612 100644
--- a/makima/src/server/mod.rs
+++ b/makima/src/server/mod.rs
@@ -18,7 +18,7 @@ use tower_http::trace::TraceLayer;
use utoipa::OpenApi;
use utoipa_swagger_ui::SwaggerUi;
-use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contract_discuss, contracts, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, repository_history, speak, templates, transcript_analysis, users, versions};
+use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contract_discuss, contracts, directives, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, repository_history, speak, templates, transcript_analysis, users, versions};
use crate::server::openapi::ApiDoc;
use crate::server::state::SharedState;
@@ -170,6 +170,19 @@ pub fn make_router(state: SharedState) -> Router {
"/contracts/{id}/chat/history",
get(contract_chat::get_contract_chat_history).delete(contract_chat::clear_contract_chat_history),
)
+ // Directive endpoints
+ .route(
+ "/directives",
+ get(directives::list_directives).post(directives::create_directive),
+ )
+ .route(
+ "/directives/{id}",
+ get(directives::get_directive)
+ .put(directives::update_directive)
+ .delete(directives::delete_directive),
+ )
+ .route("/directives/{id}/chains", get(directives::list_chains))
+ .route("/directives/{id}/chains/{chain_id}", get(directives::get_chain))
// Contract supervisor resume endpoints
.route("/contracts/{id}/supervisor/resume", post(mesh_supervisor::resume_supervisor))
.route("/contracts/{id}/supervisor/conversation/rewind", post(mesh_supervisor::rewind_conversation))