mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
c983c0d809
From the deep-research map of NousResearch/Hermes-Agent vs ruflo (3 small, high-confidence, in-repo adoptions; the rest were SKIP/ADR-gated). - #8 Prompt caching: agent_execute's direct Anthropic call (agent-execute-core.ts — the path the cli actually uses) now marks the system prompt as an ephemeral cache breakpoint (~90% discount on cached input tokens, 5-min TTL). Also applied the system+trailing-message breakpoint strategy to @claude-flow/providers' anthropic-provider (separate package; gated by new config.promptCache, default on). - #14 Reasoning-tag scrub: scrubReasoningBlocks() strips <think>/<thinking>/ <reasoning>/<REASONING_SCRATCHPAD> blocks from trajectory action/result before DISTILL, so extended-thinking tokens don't contaminate pattern embeddings. Boundary-gated (leaves prose that merely mentions the tags untouched). - #6 Tool-loop circuit breaker: new tool-loop-guardrail.ts; post-command records (command, success), pre-command warns at 3 / blocks at 5 consecutive failures of the same command with a recovery hint. Orthogonal to the security tool-output-guardrail (injection). Advisory by default. Note: @claude-flow/providers is NOT consumed by the cli (separate published package), so the cli-effective #8 fix is in agent-execute-core.ts; the providers change ships on its own cadence. Verification: cli + providers build clean; 29/29 targeted tests pass (hermes-tier1 6 + bandit 8 + bug-cluster 15). Deep-research map also produced 5 corrections to ADR-113 (#1907).