From fdad5c02a6b11671b777229a26d2d3a5276fe701 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 7 Jul 2026 16:06:51 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B1=20fix:=20Add=20explicit=20types=20?= =?UTF-8?q?for=20isolatedDeclarations=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The production build (tsdown + rolldown-plugin-dts) compiles with --isolatedDeclarations, which requires explicit type annotations on exported bindings whose initializers it can't infer syntactically. `CHECKPOINT_HARD_LIMIT_BYTES` (arithmetic over two consts) tripped TS9010; annotate it and `CHECKPOINT_WARN_BYTES` as `number`. Verified with `tsc --isolatedDeclarations` over the package. --- packages/api/src/agents/checkpointer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/api/src/agents/checkpointer.ts b/packages/api/src/agents/checkpointer.ts index 0491617f45..54c4d089a1 100644 --- a/packages/api/src/agents/checkpointer.ts +++ b/packages/api/src/agents/checkpointer.ts @@ -143,13 +143,14 @@ const CHECKPOINT_SIZE_HEADROOM_BYTES = 1024 * 1024; * way (the document can't be written), so failing here as a typed {@link CheckpointTooLargeError} * turns an opaque `BSONObjectTooLarge` crash into an actionable one. */ -export const CHECKPOINT_HARD_LIMIT_BYTES = MAX_BSON_DOCUMENT_BYTES - CHECKPOINT_SIZE_HEADROOM_BYTES; +export const CHECKPOINT_HARD_LIMIT_BYTES: number = + MAX_BSON_DOCUMENT_BYTES - CHECKPOINT_SIZE_HEADROOM_BYTES; /** * Warn once a persisted checkpoint crosses this soft threshold (~50% of the ceiling), so a * conversation's checkpoint growth is visible in logs well before it reaches the hard limit. */ -export const CHECKPOINT_WARN_BYTES = 8 * 1024 * 1024; +export const CHECKPOINT_WARN_BYTES: number = 8 * 1024 * 1024; /** * A HITL checkpoint whose serialized state exceeds {@link CHECKPOINT_HARD_LIMIT_BYTES} — more