@cline/core 0.0.40 → 0.0.41-nightly.1778815163

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,4 +21,18 @@ export interface ContextCompactionPrepareTurnOptions {
21
21
  mode?: ContextCompactionMode;
22
22
  manualTargetRatio?: number;
23
23
  }
24
- export declare function createContextCompactionPrepareTurn(config: Pick<CoreSessionConfig, "providerConfig" | "providerId" | "modelId" | "compaction" | "logger">, options?: ContextCompactionPrepareTurnOptions): ((context: ContextPipelinePrepareTurnInput) => Promise<ContextPipelinePrepareTurnResult | undefined>) | undefined;
24
+ /**
25
+ * Build the `prepareTurn` callback used by the agent runtime to compact the
26
+ * transcript before each model request.
27
+ *
28
+ * Telemetry: emits `task.compaction_executed` on a successful compaction and
29
+ * `task.compaction_skipped` when the configured strategy returns `undefined`.
30
+ * Telemetry is keyed by `config.sessionId` (falling back to the per-turn
31
+ * `conversationId`) and tagged with `provider` / `modelId`.
32
+ *
33
+ * Known gap: compactions performed via plugin `registerMessageBuilder()` or
34
+ * via the `beforeModel` runtime hook bypass this wrapper entirely, so they
35
+ * do not emit compaction telemetry. If we want coverage there too, the
36
+ * plugin/hook pipelines must be instrumented separately.
37
+ */
38
+ export declare function createContextCompactionPrepareTurn(config: Pick<CoreSessionConfig, "providerConfig" | "providerId" | "modelId" | "compaction" | "logger" | "telemetry" | "sessionId">, options?: ContextCompactionPrepareTurnOptions): ((context: ContextPipelinePrepareTurnInput) => Promise<ContextPipelinePrepareTurnResult | undefined>) | undefined;