feat: add context budget utility

This commit is contained in:
2026-06-11 09:22:34 +01:00
parent 5119c7b00c
commit 1dfc3fc363
4 changed files with 385 additions and 5 deletions
+6 -4
View File
@@ -71,14 +71,16 @@ Requirements:
- Priority-based trimming when limits exceeded.
- Reject oversized input with safe message.
Status: ⏳ Pending
Status: ✅ Complete
### Task 1.4 - Error formatting utility
### Task 1.4 - Safe logging helper
Create `src/utils/errors.js` and `src/utils/logging.js`.
Create `src/utils/logging.js`.
Requirements:
- Safe error message formatting (no stack traces).
- Minimal logging to stderr only.
- Log safe metadata (tool name, timestamp, model, input/output size, duration, success/failure, error type).
- No stack traces in logs.
- No sensitive data in logs.
Status: ⏳ Pending