singularity-forge/packages/pi-coding-agent/src/utils
frizynn 3090f968f4 refactor: extract retry handler and compaction orchestrator from agent-session
Extract two self-contained subsystems from agent-session.ts (3,367 -> 2,737 lines):

- RetryHandler: auto-retry with exponential backoff, credential rotation,
  and cross-provider fallback logic
- CompactionOrchestrator: manual/auto compaction, overflow recovery, and
  extension integration for custom compaction providers

Also add shared getErrorMessage() utility to replace repeated
`err instanceof Error ? err.message : String(err)` patterns.

The extracted modules receive AgentSession state via dependency injection
interfaces, avoiding state duplication. AgentSession remains the coordinator
that delegates to these modules.
2026-03-19 16:46:14 -03:00
..
changelog.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
clipboard-image.ts fix: handle BMP clipboard images on WSL2 via wl-paste PNG conversion or ImageMagick (#813) (#841) 2026-03-17 07:59:56 -06:00
clipboard-native.ts feat: replace clipboard implementations with native @gsd/native module 2026-03-13 13:31:22 -06:00
clipboard.ts feat: replace clipboard implementations with native @gsd/native module 2026-03-13 13:31:22 -06:00
error.ts refactor: extract retry handler and compaction orchestrator from agent-session 2026-03-19 16:46:14 -03:00
frontmatter.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
git.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
image-convert.ts feat: wire native Rust image module into image processing pipeline 2026-03-13 13:41:53 -06:00
image-resize.ts feat: wire native Rust image module into image processing pipeline 2026-03-13 13:41:53 -06:00
mime.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
path-display.ts fix: normalize Windows paths in LLM-visible text to prevent bash failures (#874) (#884) 2026-03-17 09:02:23 -06:00
photon.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
shell.ts fix: sanitize Windows NUL redirects to /dev/null in Git Bash (#157) 2026-03-13 09:33:28 -06:00
sleep.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
tools-manager.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00