ACP: default stream delivery to final_only

This commit is contained in:
Onur
2026-03-01 13:11:19 +01:00
committed by Onur Solmaz
parent 4e2efaf659
commit 4a82012461
3 changed files with 9 additions and 6 deletions

View File

@@ -347,6 +347,7 @@ describe("createAcpReplyProjector", () => {
stream: {
coalesceIdleMs: 0,
maxChunkChars: 256,
deliveryMode: "live",
maxTurnChars: 5,
},
},
@@ -370,10 +371,12 @@ describe("createAcpReplyProjector", () => {
});
await projector.flush(true);
expect(deliveries).toEqual([
{ kind: "block", text: "hello" },
{ kind: "tool", text: prefixSystemMessage("output truncated") },
]);
expect(deliveries).toHaveLength(2);
expect(deliveries).toContainEqual({ kind: "block", text: "hello" });
expect(deliveries).toContainEqual({
kind: "tool",
text: prefixSystemMessage("output truncated"),
});
});
it("enforces maxMetaEventsPerTurn without suppressing assistant text", async () => {

View File

@@ -9,7 +9,7 @@ import { createAcpTestConfig } from "./test-fixtures/acp-runtime.js";
describe("acp stream settings", () => {
it("resolves stable defaults", () => {
const settings = resolveAcpProjectionSettings(createAcpTestConfig());
expect(settings.deliveryMode).toBe("live");
expect(settings.deliveryMode).toBe("final_only");
expect(settings.repeatSuppression).toBe(true);
expect(settings.maxTurnChars).toBe(24_000);
expect(settings.maxMetaEventsPerTurn).toBe(64);

View File

@@ -5,7 +5,7 @@ import { resolveEffectiveBlockStreamingConfig } from "./block-streaming.js";
const DEFAULT_ACP_STREAM_COALESCE_IDLE_MS = 350;
const DEFAULT_ACP_STREAM_MAX_CHUNK_CHARS = 1800;
const DEFAULT_ACP_REPEAT_SUPPRESSION = true;
const DEFAULT_ACP_DELIVERY_MODE = "live";
const DEFAULT_ACP_DELIVERY_MODE = "final_only";
const DEFAULT_ACP_MAX_TURN_CHARS = 24_000;
const DEFAULT_ACP_MAX_TOOL_SUMMARY_CHARS = 320;
const DEFAULT_ACP_MAX_STATUS_CHARS = 320;