Merge main into the engine loop improvements

Keep both intents: check stages, allow_workspace_changes, outcome repair
counts and Claude stage re-adoption from main beside the findings gate,
resume_session, applyLimitOn and exhaustion decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:24:27 +00:00
135 changed files with 7978 additions and 453 deletions
+3
View File
@@ -53,6 +53,9 @@ const (
// NotificationChatNotify is an agent's own notify tool call. Its priority
// is the tool's: low 2, default 3, high 4.
NotificationChatNotify = "chat_notify"
// NotificationSchedule says a scheduled run was delayed (its workspace was
// busy) or skipped. It is low priority (2).
NotificationSchedule = "schedule"
)
// DefaultNotificationPriority is ntfy's default priority, which every ntfy
+9 -2
View File
@@ -458,6 +458,9 @@ type ControlEvidence struct {
LimitReached bool `json:"limit_reached,omitempty"`
ModelTarget string `json:"model_target,omitempty"`
Memory map[string]MemoryRead `json:"memory,omitempty"`
// OutcomeRepairs counts the "missing # outcome" repair follow-ups the
// server sent during this visit (0 when the first answer was valid).
OutcomeRepairs int `json:"outcome_repairs,omitempty"`
}
// StageFileChanges is observed workspace evidence, not a model's claim of authorship.
@@ -483,9 +486,13 @@ type FileChange struct {
NoPatch bool `json:"no_patch,omitempty"`
// NoPatchReason says why a content change has no (complete) patch:
// "binary", "file_size" (text over 1 MiB), "budget" (snapshot text budget),
// "lines" (over 5,000 combined lines), "evidence_size" (per-visit retained
// "lines" (over 20,000 combined lines), "evidence_size" (per-visit retained
// evidence limit), "git_status" (seen only in Git status) or "baseline"
// (stage-start content unrecoverable). Empty when a patch was recorded.
// (stage-start content unrecoverable). Policy reasons, which list the
// change completely and leave Truncated unset: "symlink" (target
// compared), "large" (over the hash bound; size/mtime/mode compared) and
// "generated" (lockfile, minified bundle, source map, cache file).
// Empty when a patch was recorded.
NoPatchReason string `json:"no_patch_reason,omitempty"`
BeforeMode string `json:"before_mode,omitempty"`
AfterMode string `json:"after_mode,omitempty"`