Repository navigation
Tags: cloudwego/eino
Tags
feat: add per-file byte cap and budget-aware truncation to agentsmd (#… …1235) Add PerAgentsMDMaxBytes to cap each AGENTS.md file individually, make AllAgentsMDMaxBytes apply to the first file too, and truncate (or drop) the file that crosses the cumulative budget instead of skipping it wholesale. Truncated files carry a notice and dropped files are summarized at the end.
refactor(adk): make the foreground handoff API usable outside the mod… …ule (#1233) Two related fixes to the public surface around foreground/background handoff. ShouldAutoBackground was unusable outside this module. Its parameter type, foreground.CandidateInfo, lives in adk/internal/foreground: packages under adk/ can import it, so the build stayed green, but an external caller cannot. There is also no workaround — Go does not infer function-literal parameter types from assignment context, and a defined type is not identical to a structurally equal struct literal, so no assignable closure can be written. The field was dead weight for every user of the framework. Expose backgroundtask.ForegroundCandidate as an alias for the internal type, plus backgroundtask.DefaultForegroundTimeoutMs, which the Config docs already referenced through an unreachable symbol. This follows the existing pattern in callbacks.RunInfo and schema.GobSerializer. foreground.Policy and ProjectionDetached stay internal: they are wiring, not user API. Rename LocalBackgroundConfig.AlwaysForeground to BackendOwnsCommandTimeout. The option's only effect is selecting what the tool's timeout argument bounds: the caller's foreground wait, or the command's own execution limit passed to filesystem.ExecuteRequest.Timeout. "Always foreground" named a derived consequence rather than the thing being configured, and hid the cost — the mode disables the Manager's foreground timer, leaving context cancellation as the only bound on a backend that ignores Timeout. Note that a nil ShouldAutoBackground is not equivalent: on timer expiry it terminates the run with a *backgroundtask.ForegroundTimeoutError rather than staying attached. The tool description variants are renamed to match (BackendTimeoutManagedExecuteToolDesc), and the internal helper becomes backendOwnsTimeoutForRun so it no longer collides with the struct field. Breaking change to unreleased API; no behavior change. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
PreviousNext