feat minor hosted feat/phase-2g-bundle
AI Agent git-import/068377df · 111 days ago · Apr 6, 2026 · Diff

feat(hosted): persist advanced consolidation knobs via billing, gateway, scheduler, bridge

Phase D: hosted users can now configure lookback_hours, max_events_per_pass, max_topics_per_pass, and llm.max_tokens — same ranges as self-hosted Phase C.

Billing: - New fields on defaultUserRecord / normalizeBillingUser (clamped to valid ranges) - Old records without these fields auto-migrate to defaults (24/200/10/1024)

Gateway: - GET /api/v1/settings: daemon blob includes advanced fields from billing record - POST /api/v1/settings/consolidation: validates + persists advanced fields - POST /api/v1/memory/consolidate proxy: merges billing defaults into body

Scheduler: - POST body to bridge includes all four knobs from billing user record

Bridge: - Reads advanced fields from body; builds daemon config for consolidateMemory - No billing DB import (gateway/scheduler already inject correct values)

Shared lib: - lib/hosted-consolidation-advanced.mjs: range constants, clamp, merge, validate - Validator rejects NaN/non-numeric inputs (Number.isFinite guard)

UI: - buildConsolSettingsPayload sends advanced fields in hosted mode

Tests: - NaN rejection, boundary values, old-record migration, normalization clamp, scheduler body capture, UI payload shape, merge override/fallback semantics

sha256:118063d047221d15bba8f2076d95515f98d9a633fd6ba0ff536a85d8987d810e sha
sha256:9a067bd12dfbff06d2389f096efa5ea1d6bebaedb6c08f60ecdca746a9cefbbb snapshot
← Older Oldest on feat/phase-2g-bundle
All commits
Newer → Latest on feat/phase-2g-bundle

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:118063d047221d15bba8f2076d95515f98d9a633fd6ba0ff536a85d8987d810e --body "your comment"