@cline/core 0.0.57 → 0.0.58-nightly.1783480459

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.
@@ -1,9 +1,9 @@
1
1
  import type { ClineCoreAutomationApi, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, CompareCheckpointInput, CompareCheckpointResult, RestoreInput, RestoreResult } from "./cline-core/types";
2
- import type { PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
2
+ import type { PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
3
3
  import { FeatureFlagsService } from "./services/feature-flags";
4
4
  import type { CoreSessionEvent } from "./types/events";
5
5
  import type { SessionHistoryRecord } from "./types/sessions";
6
- export type { ClineAutomationEventIngressResult, ClineAutomationEventLog, ClineAutomationEventSuppression, ClineAutomationListEventsOptions, ClineAutomationListRunsOptions, ClineAutomationListSpecsOptions, ClineAutomationRun, ClineAutomationRunStatus, ClineAutomationSpec, ClineCoreAutomationApi, ClineCoreAutomationOptions, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, HubOptions, RemoteOptions, CompareCheckpointInput, CompareCheckpointResult, RestoreInput, RestoreOptions, RestoreResult, RuntimeHostMode, StartSessionBootstrap, } from "./cline-core/types";
6
+ export type { ClineAutomationEventIngressResult, ClineAutomationEventLog, ClineAutomationEventSuppression, ClineAutomationListEventsOptions, ClineAutomationListRunsOptions, ClineAutomationListSpecsOptions, ClineAutomationRun, ClineAutomationRunStatus, ClineAutomationSpec, ClineCoreAutomationApi, ClineCoreAutomationOptions, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, CompareCheckpointInput, CompareCheckpointResult, HubOptions, RemoteOptions, RestoreInput, RestoreOptions, RestoreResult, RuntimeHostMode, StartSessionBootstrap, } from "./cline-core/types";
7
7
  /**
8
8
  * The primary entry point for the Cline Core SDK.
9
9
  *
@@ -220,6 +220,14 @@ export declare class ClineCore {
220
220
  * ```
221
221
  */
222
222
  update: RuntimeHost["updateSession"];
223
+ /**
224
+ * Stores the compacted working-context state for an existing session.
225
+ */
226
+ updateSessionCompactionState: RuntimeHost["updateSessionCompactionState"];
227
+ /**
228
+ * Reads the compacted working-context sidecar for a session, if one exists.
229
+ */
230
+ readSessionCompactionState: RuntimeHost["readSessionCompactionState"];
223
231
  /**
224
232
  * Reads message history for a session.
225
233
  *
@@ -283,4 +291,9 @@ export declare class ClineCore {
283
291
  * ```
284
292
  */
285
293
  updateSessionModel: SessionModelRuntimeService["updateSessionModel"];
294
+ /**
295
+ * Updates provider/model/reasoning connection options for subsequent turns in
296
+ * an active session.
297
+ */
298
+ updateSessionConnection: SessionConnectionRuntimeService["updateSessionConnection"];
286
299
  }
@@ -1,5 +1,5 @@
1
- import type { PendingPromptsRuntimeService, PendingPromptsServiceApi, RuntimeHost, SessionModelRuntimeService, SessionUsageRuntimeService } from "../runtime/host/runtime-host";
1
+ import type { PendingPromptsRuntimeService, PendingPromptsServiceApi, RuntimeHost, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService } from "../runtime/host/runtime-host";
2
2
  import { type ClineCoreSettingsApi } from "../settings";
3
- export type RuntimeHostServiceExtensions = RuntimeHost & Partial<PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionModelRuntimeService>;
3
+ export type RuntimeHostServiceExtensions = RuntimeHost & Partial<PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionConnectionRuntimeService & SessionModelRuntimeService>;
4
4
  export declare function createClineCoreSettingsApi(host: RuntimeHost): ClineCoreSettingsApi;
5
5
  export declare function createClineCorePendingPromptsApi(host: RuntimeHost): PendingPromptsServiceApi;
@@ -1,3 +1,4 @@
1
+ import { type SessionCompactionState } from "../../session/models/session-compaction";
1
2
  import type { CoreCompactionContext, CoreSessionConfig } from "../../types/config";
2
3
  export interface ContextPipelinePrepareTurnInput {
3
4
  agentId: string;
@@ -16,6 +17,7 @@ export interface ContextPipelinePrepareTurnResult {
16
17
  messages: CoreCompactionContext["messages"];
17
18
  systemPrompt?: string;
18
19
  }
20
+ export type ContextPipelinePrepareTurn = (context: ContextPipelinePrepareTurnInput) => Promise<ContextPipelinePrepareTurnResult | undefined>;
19
21
  export type ContextCompactionMode = "auto" | "manual";
20
22
  export interface ContextCompactionPrepareTurnOptions {
21
23
  mode?: ContextCompactionMode;
@@ -36,3 +38,8 @@ export interface ContextCompactionPrepareTurnOptions {
36
38
  * plugin/hook pipelines must be instrumented separately.
37
39
  */
38
40
  export declare function createContextCompactionPrepareTurn(config: Pick<CoreSessionConfig, "providerConfig" | "providerId" | "modelId" | "compaction" | "logger" | "telemetry" | "sessionId">, options?: ContextCompactionPrepareTurnOptions): ((context: ContextPipelinePrepareTurnInput) => Promise<ContextPipelinePrepareTurnResult | undefined>) | undefined;
41
+ export declare function createCompactionStateAwarePrepareTurn(input: {
42
+ compact?: ContextPipelinePrepareTurn;
43
+ getState?: () => SessionCompactionState | undefined;
44
+ saveState?: (state: SessionCompactionState) => void | Promise<void>;
45
+ }): ContextPipelinePrepareTurn;
@@ -14,6 +14,12 @@ export declare class TimeoutError extends Error {
14
14
  export declare function withTimeout<T>(promise: Promise<T>, ms: number, message: string): Promise<T>;
15
15
  export declare function formatReadFileQuery(request: ReadFileRequest): string;
16
16
  export declare function getReadFileRangeError(request: ReadFileRequest): string | null;
17
+ /**
18
+ * Some models emit a file's line range as a separate array element instead of
19
+ * placing start_line/end_line on the same object as its path. Fold such
20
+ * orphan range entries into the preceding file entry before validation.
21
+ */
22
+ export declare function coalesceOrphanReadRanges(input: unknown): unknown;
17
23
  export declare function normalizeRunCommandsInput(input: unknown): Array<string | StructuredCommandInput>;
18
24
  export declare function formatRunCommandQuery(command: string | StructuredCommandInput): string;
19
25
  /**
@@ -1,7 +1,7 @@
1
1
  import type { AgentConfig, AgentEvent, AgentHooks, AgentTool, BasicLogger, HookErrorMode, ITelemetryService, ToolApprovalRequest, ToolApprovalResult } from "@cline/shared";
2
2
  import { SessionRuntime } from "../../../runtime/orchestration/session-runtime-orchestrator";
3
3
  type AgentExtension = NonNullable<AgentConfig["extensions"]>[number];
4
- export type DelegatedAgentConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "providerConfig" | "knownModels" | "thinking" | "maxTokensPerTurn">;
4
+ export type DelegatedAgentConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "providerConfig" | "knownModels" | "thinking" | "reasoningEffort" | "thinkingBudgetTokens" | "maxTokensPerTurn">;
5
5
  export interface DelegatedAgentRuntimeConfig extends DelegatedAgentConnectionConfig {
6
6
  cwd?: string;
7
7
  providerId: string;