Commit Graph

3 Commits

  • Add tool result streaming
    - Add AgentToolUpdateCallback type and optional onUpdate callback to AgentTool.execute()
    - Add tool_execution_update event with toolCallId, toolName, args, partialResult
    - Normalize tool_execution_end to always use AgentToolResult (no more string fallback)
    - Bash tool streams truncated rolling buffer output during execution
    - ToolExecutionComponent shows last N lines when collapsed (not first N)
    - Interactive mode handles tool_execution_update events
    - Update RPC docs and ai/agent READMEs
    
    fixes #44
  • Auto-retry on transient provider errors (overloaded, rate limit, 5xx)
    - Add retry logic with exponential backoff (2s, 4s, 8s) in AgentSession
    - Disable Anthropic SDK built-in retries (maxRetries: 0) to allow app-level handling
    - TUI shows retry status with Escape to cancel
    - RPC mode: add set_auto_retry, abort_retry commands and auto_retry_start/end events
    - Configurable via settings.json: retry.enabled, retry.maxRetries, retry.baseDelayMs
    - Exclude context overflow errors from retry (handled by compaction)
    
    fixes #157
  • Simplify compaction: remove proactive abort, use Agent.continue() for retry
    - Add agentLoopContinue() to pi-ai for resuming from existing context
    - Add Agent.continue() method and transport.continue() interface
    - Simplify AgentSession compaction to two cases: overflow (auto-retry) and threshold (no retry)
    - Remove proactive mid-turn compaction abort
    - Merge turn prefix summary into main summary
    - Add isCompacting property to AgentSession and RPC state
    - Block input during compaction in interactive mode
    - Show compaction count on session resume
    - Rename RPC.md to rpc.md for consistency
    
    Related to #128