diff options
Diffstat (limited to 'makima/src/daemon/cli')
| -rw-r--r-- | makima/src/daemon/cli/directive.rs | 48 | ||||
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 18 |
2 files changed, 66 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs index 2e6ac1d..8eded77 100644 --- a/makima/src/daemon/cli/directive.rs +++ b/makima/src/daemon/cli/directive.rs @@ -125,3 +125,51 @@ pub struct UpdateArgs { #[arg(long)] pub pr_branch: Option<String>, } + +/// Arguments for memory-set command. +#[derive(Args, Debug)] +pub struct MemorySetArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// Memory key + pub key: String, + + /// Memory value + pub value: String, +} + +/// Arguments for memory-get command. +#[derive(Args, Debug)] +pub struct MemoryGetArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// Memory key + pub key: String, +} + +/// Arguments for memory-list command (uses DirectiveArgs directly). + +/// Arguments for memory-delete command. +#[derive(Args, Debug)] +pub struct MemoryDeleteArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// Memory key to delete + pub key: String, +} + +/// Arguments for memory-clear command (uses DirectiveArgs directly). + +/// Arguments for memory-batch-set command. +#[derive(Args, Debug)] +pub struct MemoryBatchSetArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// JSON object of key-value pairs: {"key1":"value1","key2":"value2"} + #[arg(long)] + pub json: String, +} diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index bcaaa70..a78e5f8 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -249,6 +249,24 @@ pub enum DirectiveCommand { /// Update directive metadata (PR URL, etc.) Update(directive::UpdateArgs), + + /// Set a memory key-value pair for the directive + MemorySet(directive::MemorySetArgs), + + /// Get a memory value by key + MemoryGet(directive::MemoryGetArgs), + + /// List all memory key-value pairs + MemoryList(DirectiveArgs), + + /// Delete a memory key + MemoryDelete(directive::MemoryDeleteArgs), + + /// Clear all memory for the directive + MemoryClear(DirectiveArgs), + + /// Batch set multiple memory key-value pairs from JSON + MemoryBatchSet(directive::MemoryBatchSetArgs), } impl Cli { |
