mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
With compaction.inContext enabled, compaction can generate the summary inside the cached conversation: it repeats the request the next turn would send, appends the instructions as a system message plus a user message, and sets toolChoice none. The recent tail is kept as before. A gate requires a verified model, a warm cache from the same model and thinking level, room in the context window, and a lower estimated cost than the standalone summary. Failed or rejected attempts fall back to the standalone summary, never execute tools, and are recorded in details.inContext with their usage. pi-ai adds the supportsInContextCompaction compat setting and test/in-context-compaction-probe.ts, which measures whether a model keeps its prompt cache for this request shape. The generated catalog flags the models that passed. |
||
|---|---|---|
| .. | ||
| regressions | ||
| agent-session-bash-persistence.test.ts | ||
| agent-session-boundaries.test.ts | ||
| agent-session-codemode.test.ts | ||
| agent-session-compaction-model-overrides.test.ts | ||
| agent-session-compaction.test.ts | ||
| agent-session-in-context-compaction.test.ts | ||
| agent-session-mcp-oauth.test.ts | ||
| agent-session-mcp.test.ts | ||
| agent-session-model-extension.test.ts | ||
| agent-session-prompt.test.ts | ||
| agent-session-queue.test.ts | ||
| agent-session-retry-events.test.ts | ||
| agent-session-runtime.test.ts | ||
| agent-session-tool-orchestration.test.ts | ||
| agent-session-tool-result-images.test.ts | ||
| harness.ts | ||
| lax-message-content.test.ts | ||
| mcp-oauth-server.ts | ||
| README.md | ||
| virtual-models.test.ts | ||
Coding agent suite tests
Use test/suite/ for the new harness-based test suite around AgentSession and AgentSessionRuntime.
Rules:
- Use
test/suite/harness.ts - Use the faux provider from
packages/ai/src/providers/faux.ts - Do not use real provider APIs, real API keys, network calls, or paid tokens
- Keep these tests CI-safe and deterministic
- Do not use or extend the legacy
test/test-harness.tspath unless a missing capability forces it