Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Merge remote-tracking branch 'origin/main' into pr1669

justrachd9017083275f
diff --cc src/mcp_call.zig
index 861c445b,238a15af..25ceb009
--- a/src/mcp_call.zig
+++ b/src/mcp_call.zig
@@@ -208,9 -217,5 +217,12 @@@ fn invoke(reg: *Registry, out_alloc: Al
out_alloc.free(text);
return .{ .text = try out_alloc.dupe(u8, mcp_elicitation.fallback), .is_error = true };
}
+ if (mcp_elicitation.rejectsApp(text)) {
+ defer out_alloc.free(text);
- return .{ .text = try std.mem.concat(out_alloc, u8, &.{ text, mcp_elicitation.bare_process_app_note }), .is_error = is_error };
++ // The note follows the original text, so a structured range still
++ // addresses the same bytes in the copy.
++ const noted = try std.mem.concat(out_alloc, u8, &.{ text, mcp_elicitation.bare_process_app_note });
++ return .{ .text = noted, .is_error = is_error, .run_task = run_task, .structured_text = if (structured_range) |range| noted[range.start..range.end] else null };
+ }
- return .{ .text = text, .is_error = is_error };
+ return .{ .text = text, .is_error = is_error, .run_task = run_task, .structured_text = if (structured_range) |range| text[range.start..range.end] else null };
}