huskies: merge 729_story_store_story_name_as_a_crdt_field_separate_from_the_story_id
This commit is contained in:
@@ -241,10 +241,13 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
|
||||
let user_story = args.get("user_story").and_then(|v| v.as_str());
|
||||
let description = args.get("description").and_then(|v| v.as_str());
|
||||
|
||||
// Collect front matter fields: explicit `agent` param + arbitrary `front_matter` object.
|
||||
// Collect front matter fields: explicit `name`/`agent` params + arbitrary `front_matter` object.
|
||||
// Values are passed as serde_json::Value so native booleans, numbers, and arrays are
|
||||
// preserved and encoded correctly as unquoted YAML by update_story_in_file.
|
||||
let mut front_matter: HashMap<String, Value> = HashMap::new();
|
||||
if let Some(name) = args.get("name").and_then(|v| v.as_str()) {
|
||||
front_matter.insert("name".to_string(), Value::String(name.to_string()));
|
||||
}
|
||||
if let Some(agent) = args.get("agent").and_then(|v| v.as_str()) {
|
||||
front_matter.insert("agent".to_string(), Value::String(agent.to_string()));
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ pub(super) fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
|
||||
},
|
||||
{
|
||||
"name": "update_story",
|
||||
"description": "Update an existing story file. Can replace the '## User Story' and/or '## Description' section content, and/or set YAML front matter fields (e.g. agent, qa). Auto-commits via the filesystem watcher.",
|
||||
"description": "Update an existing story file. Can rename the story, replace the '## User Story' and/or '## Description' section content, and/or set YAML front matter fields (e.g. agent, qa). Auto-commits via the filesystem watcher.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -406,6 +406,10 @@ pub(super) fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
|
||||
"type": "string",
|
||||
"description": "Story identifier (filename stem, e.g. '28_my_story')"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "New human-readable name for the story (stored as a CRDT field; does not change the story_id or any references)"
|
||||
},
|
||||
"user_story": {
|
||||
"type": "string",
|
||||
"description": "New user story text to replace the '## User Story' section content"
|
||||
|
||||
Reference in New Issue
Block a user