summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-13 00:18:15 +0000
committersoryu <soryu@soryu.co>2026-02-13 00:18:15 +0000
commitdd8985d2c84e71177641f5e772492381998a29f4 (patch)
tree50f8a46251435aef9c3e2b254a55733e0c1fa164
parent03f45b634a2374bc6ce7523d81a2eddba79a4e8d (diff)
downloadsoryu-makima/makima-jp--register-orders-api-in-openapi-document-aa251ef1.tar.gz
soryu-makima/makima-jp--register-orders-api-in-openapi-document-aa251ef1.zip
feat: makima.jp: Register orders API in OpenAPI documentationmakima/makima-jp--register-orders-api-in-openapi-document-aa251ef1
-rw-r--r--makima/src/db/models.rs1
-rw-r--r--makima/src/orchestration/directive.rs8
-rw-r--r--makima/src/server/handlers/directives.rs2
-rw-r--r--makima/src/server/handlers/orders.rs2
4 files changed, 6 insertions, 7 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs
index 49517d5..372d123 100644
--- a/makima/src/db/models.rs
+++ b/makima/src/db/models.rs
@@ -2717,7 +2717,6 @@ pub struct Directive {
pub memory_enabled: bool,
pub goal_updated_at: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
- pub memory_enabled: bool,
pub version: i32,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
diff --git a/makima/src/orchestration/directive.rs b/makima/src/orchestration/directive.rs
index cb3983a..d45111a 100644
--- a/makima/src/orchestration/directive.rs
+++ b/makima/src/orchestration/directive.rs
@@ -46,7 +46,7 @@ impl DirectiveOrchestrator {
// Load memories if memory is enabled for this directive
let memories = if directive.memory_enabled {
- match repository::list_directive_memories(&self.pool, directive.id).await {
+ match repository::list_directive_memories(&self.pool, directive.id, None).await {
Ok(m) => m,
Err(e) => {
tracing::warn!(
@@ -105,7 +105,7 @@ impl DirectiveOrchestrator {
// Load memories if memory is enabled for this directive
let memory_context = if step.memory_enabled {
- match repository::list_directive_memories(&self.pool, step.directive_id).await {
+ match repository::list_directive_memories(&self.pool, step.directive_id, None).await {
Ok(memories) if !memories.is_empty() => {
format!("\n\nMEMORY CONTEXT (from previous planning/execution cycles):\n{}\n",
format_memories_for_prompt(&memories))
@@ -281,7 +281,7 @@ impl DirectiveOrchestrator {
// Load memories if memory is enabled for this directive
let memories = if directive.memory_enabled {
- match repository::list_directive_memories(&self.pool, directive.id).await {
+ match repository::list_directive_memories(&self.pool, directive.id, None).await {
Ok(m) => m,
Err(e) => {
tracing::warn!(
@@ -660,7 +660,7 @@ fn format_memories_for_prompt(memories: &[DirectiveMemory]) -> String {
for memory in memories {
out.push_str(&format!(
"- [{}] ({}): {}\n",
- memory.category, memory.source, memory.content
+ memory.category.as_deref().unwrap_or("general"), memory.key, memory.value
));
}
out
diff --git a/makima/src/server/handlers/directives.rs b/makima/src/server/handlers/directives.rs
index f624d82..e4a5815 100644
--- a/makima/src/server/handlers/directives.rs
+++ b/makima/src/server/handlers/directives.rs
@@ -1090,7 +1090,7 @@ pub async fn batch_set_memories(
}
}
- match repository::batch_set_directive_memories(pool, id, &req.memories).await {
+ match repository::batch_set_directive_memories(pool, id, &req.entries).await {
Ok(memories) => Json(memories).into_response(),
Err(e) => {
tracing::error!("Failed to batch set memories: {}", e);
diff --git a/makima/src/server/handlers/orders.rs b/makima/src/server/handlers/orders.rs
index 0974dd4..c348246 100644
--- a/makima/src/server/handlers/orders.rs
+++ b/makima/src/server/handlers/orders.rs
@@ -10,7 +10,7 @@ use uuid::Uuid;
use crate::db::models::{
CreateOrderLabelRequest, CreateOrderRequest, Order, OrderLabel, OrderListResponse,
- OrderSummary, UpdateOrderRequest,
+ UpdateOrderRequest,
};
use crate::db::repository;
use crate::server::auth::Authenticated;