ktg-plugin-marketplace/plugins/ms-ai-architect/scripts/kb-update/lib
Kjell Tore Guttormsen f2b76b6d8e feat(ms-ai-architect): add lib/cost-estimat heuristic for API-key budget [skip-docs]
Pure auth-mode-aware cost estimator for v1.12.0 cron pre-flight.

Heuristic: critical+high files only (medium/low excluded per brief);
3000 input + 1500 output tokens per file at Sonnet pricing
($3/M in, $15/M out).

Auth-mode behavior:
- api-key:   numeric usd, kvote_warn off  (subject to dollar-cap)
- long-oauth, subscription-browser-only:
             usd null, kvote_warn on      (quota, no dollar billing)
- unauthenticated/missing: best-effort api-key estimate

11/11 tests pass; covers both billing modes plus token-math
invariance across auth-mode (auth only affects dollar-field, not tokens).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 10:34:37 +02:00
..
atomic-write.mjs feat(ms-ai-architect): add lib/atomic-write for crash-safe state files [skip-docs] 2026-05-05 10:32:13 +02:00
cost-estimat.mjs feat(ms-ai-architect): add lib/cost-estimat heuristic for API-key budget [skip-docs] 2026-05-05 10:34:37 +02:00
cross-platform-paths.mjs feat(ms-ai-architect): add lib/cross-platform-paths for cache/log/state/backup dirs [skip-docs] 2026-05-05 10:30:31 +02:00
registry-io.mjs feat(ms-ai-architect): sitemap-based KB change detection system 2026-04-09 21:19:51 +02:00
sitemap-stream.mjs feat(ms-ai-architect): sitemap-based KB change detection system 2026-04-09 21:19:51 +02:00
url-normalize.mjs feat(ms-ai-architect): sitemap-based KB change detection system 2026-04-09 21:19:51 +02:00