Harden Harness runtime, persistence and execution for Hand

This commit is contained in:
sausheong committed 2026-09-09 22:55:55 +08:00
1 parent 09c30fe2d5
commit 0972eed3ea
164 files changed
+15912 -506

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
package runtime
import "fmt"
// Provider IDs identify result ownership within a single response. Never
// overwrite a running result channel or dispatch an ambiguous second call.
func acceptToolCallID(seen map[string]bool, id string) error {
if id == "" {
return fmt.Errorf("provider returned an empty tool call ID")
}
if seen[id] {
return fmt.Errorf("provider returned a duplicate tool call ID")
}
seen[id] = true
return nil
}