summaryrefslogtreecommitdiff
path: root/internal/agentloop
diff options
context:
space:
mode:
authorClaudomator Agent <agent@claudomator>2026-07-08 09:31:15 +0000
committerClaudomator Agent <agent@claudomator>2026-07-08 09:31:15 +0000
commit9aee6e769a19fcf21493f9f76c967bc3ff5557de (patch)
treef637d3a6f349fbef3c96b8fd67af3a50241be940 /internal/agentloop
parent4ffd8ad0a66578c6bf879260af77e49bfa09d794 (diff)
feat(agentloop,executor): expose report_verdict as a tool on both transports
Diffstat (limited to 'internal/agentloop')
-rw-r--r--internal/agentloop/tools.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/agentloop/tools.go b/internal/agentloop/tools.go
index 32dd284..2bdf0e0 100644
--- a/internal/agentloop/tools.go
+++ b/internal/agentloop/tools.go
@@ -123,6 +123,18 @@ func agentToolSpecs() []provider.ToolSpec {
},
},
{
+ Name: "report_verdict",
+ Description: "Report a structured approve/reject decision after evaluating another task's work (e.g. as an arbitration-role task). Call this before report_summary when your job is to decide whether the work is acceptable — this is read by the orchestrator to decide the outcome, not just logged for a human to read later.",
+ ParametersJSONSchema: map[string]any{
+ "type": "object",
+ "properties": map[string]any{
+ "approved": map[string]any{"type": "boolean", "description": "true if the work meets its acceptance criteria and should proceed; false if it needs to be sent back for a fix"},
+ "reasoning": strProp("a concise explanation of the decision"),
+ },
+ "required": []string{"approved", "reasoning"},
+ },
+ },
+ {
Name: "read_file",
Description: "Read the contents of a file in the sandbox working directory.",
ParametersJSONSchema: map[string]any{
@@ -263,6 +275,17 @@ func (l *Loop) dispatchTool(ctx context.Context, name, argsJSON string) (result
}
return fmt.Sprintf("Proposed role config %s v%d (draft)", a.Role, version), false, nil
+ case "report_verdict":
+ var a struct {
+ Approved bool `json:"approved"`
+ Reasoning string `json:"reasoning"`
+ }
+ _ = json.Unmarshal([]byte(argsJSON), &a)
+ if rvErr := l.Channel.ReportVerdict(ctx, a.Approved, a.Reasoning); rvErr != nil {
+ return "", false, rvErr
+ }
+ return "Verdict recorded.", false, nil
+
case "read_file":
var a struct {
Path string `json:"path"`