Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8e98d09
feat(backend): context-window resolution, token estimation & chat com…
Jun 11, 2026
7e6f9b8
feat(frontend): context-usage ring, per-message stats & tool-call dur…
Jun 11, 2026
fa78e7a
Merge branch 'main' into feature/context-compaction-clean
Jun 11, 2026
9e3bf4a
fix(backend): resolve context window when OpenAI-compatible baseUrl e…
Jun 11, 2026
ff0620b
feat(backend): stream per-message stats on the finish event
Jun 11, 2026
8142c00
feat(frontend): chunk 11 — ring fix, (i) tooltip, compaction timeline…
Jun 12, 2026
2031176
fix(frontend): add hover tooltip to per-message stats (i) button
Jun 12, 2026
7d91a02
feat: remove per-agent compaction config, use global defaults
Jun 12, 2026
2242801
chore(backend): drop dead agent binding from buildCompactionRuntime
Jun 12, 2026
da2c159
feat(backend): env overrides for global compaction ceiling
Jun 12, 2026
55fc2f0
chore(backend): add compaction.check debug log at trigger decision point
Jun 12, 2026
269a8be
chore(docs): add Hermes/Codex prior-art + 2026-06-12 field re-survey …
Jun 12, 2026
9604bdd
chore(docs): plan Chunk 13 — compaction reliability + prompt overhaul
Jun 12, 2026
212220f
feat(backend): chunk 13 — summarize heartbeat + output ceiling + prom…
Jun 13, 2026
48cb9cf
fix(backend): harden chunk 13 summarizer per review
Jun 13, 2026
797af60
fix(backend): prune large tool results in kept recent messages
Jun 13, 2026
9d03480
chore(docs): plan Chunk 14 — kept-message tool-result handling
Jun 13, 2026
f464910
fix(backend): chunk 14 option D — overflow-gate recent-trim + exempt …
Jun 14, 2026
32b186e
feat(backend): chunk 14 task 2 — Stage 0 context editing (tool-result…
Jun 14, 2026
df533db
Merge remote-tracking branch 'origin/main' into feature/context-compa…
Jun 14, 2026
724d874
fix(backend): chunk 14 compaction hardening (A1-A6, B-F1-F8)
Jun 14, 2026
041f697
fix(backend): harden compaction per final ADR-0012 review
Jun 15, 2026
ecff2f5
fix(backend): satisfy strict eslint type-aware rules in compaction code
Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion apps/backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,21 @@ PLATYPUS_SANDBOX_DOCKER_ENABLED=false
# PLATYPUS_SANDBOX_DOCKER_ALLOWED_NETWORKS=shared-services,public-tools

# Frontend URL for generating resource links in tool responses
FRONTEND_URL=http://localhost:3001
FRONTEND_URL=http://localhost:3001

# Context compaction (ADR-0012 §Config & kill switch).
# Compaction behavior is global; window/output size stays per-model.
# COMPACTION_ENABLED=false disables proactive compaction (recovery still runs).
# COMPACTION_ENABLED=true
#
# Optional overrides for the global ceiling. Unset = built-in defaults
# (trigger 0.8, target 0.5, reserve 0.05, keepRecent 10, minPrunable 2000,
# minRecentPrunable 10000).
# Lower the trigger to exercise auto-compaction on test deployments.
# Keep target < trigger or compaction re-fires every turn.
# COMPACTION_TRIGGER_RATIO=0.8
# COMPACTION_TARGET_RATIO=0.5
# COMPACTION_RESERVE_RATIO=0.05
# COMPACTION_KEEP_RECENT=10
# COMPACTION_MIN_PRUNABLE_CHARS=2000
# COMPACTION_MIN_RECENT_PRUNABLE_CHARS=10000
5 changes: 5 additions & 0 deletions apps/backend/drizzle/0046_context_compaction.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE "chat" ADD COLUMN "context_summary" text;--> statement-breakpoint
ALTER TABLE "chat" ADD COLUMN "summary_watermark" text;--> statement-breakpoint
ALTER TABLE "chat" ADD COLUMN "compaction_dirty" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "chat" ADD COLUMN "version" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE "provider" ADD COLUMN "model_meta" jsonb;
Loading