@cline/core 0.0.59 → 0.0.60
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.
- package/dist/auth/cline.d.ts +8 -0
- package/dist/extensions/context/agentic-compaction.d.ts +6 -0
- package/dist/extensions/context/budget-projection/index.d.ts +2 -0
- package/dist/extensions/context/budget-projection/project.d.ts +4 -0
- package/dist/extensions/context/budget-projection/types.d.ts +58 -0
- package/dist/hub/daemon/entry.js +212 -210
- package/dist/hub/index.js +209 -207
- package/dist/index.d.ts +11 -9
- package/dist/index.js +213 -211
- package/dist/logging/early-logger.d.ts +37 -0
- package/dist/runtime/config/connection-update.d.ts +27 -0
- package/dist/runtime/host/local-runtime-host.d.ts +10 -0
- package/dist/services/llms/provider-settings.d.ts +19 -19
- package/dist/services/telemetry/core-events.d.ts +33 -1
- package/dist/services/telemetry/index.js +1 -1
- package/dist/session/models/session-manifest.d.ts +3 -3
- package/dist/types/chat-schema.d.ts +8 -8
- package/dist/types/config.d.ts +16 -0
- package/package.json +4 -4
package/dist/auth/cline.d.ts
CHANGED
|
@@ -59,5 +59,13 @@ export declare function completeClineDeviceAuth(options: {
|
|
|
59
59
|
telemetry?: ITelemetryService;
|
|
60
60
|
}): Promise<ClineOAuthCredentials>;
|
|
61
61
|
export declare function refreshClineToken(current: ClineOAuthCredentials, options: ClineOAuthProviderOptions): Promise<ClineOAuthCredentials>;
|
|
62
|
+
/**
|
|
63
|
+
* Resolve valid Cline credentials, refreshing when needed.
|
|
64
|
+
*
|
|
65
|
+
* Contract: returns refreshed/current credentials when usable; returns `null`
|
|
66
|
+
* ONLY when the refresh token was rejected (invalid grant — re-auth required);
|
|
67
|
+
* THROWS on transient failures (network, timeout, 5xx) so callers can leave
|
|
68
|
+
* stored credentials untouched and retry later.
|
|
69
|
+
*/
|
|
62
70
|
export declare function getValidClineCredentials(currentCredentials: ClineOAuthCredentials | null, providerOptions: ClineOAuthProviderOptions, options?: ClineTokenResolution): Promise<ClineOAuthCredentials | null>;
|
|
63
71
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { BasicLogger } from "@cline/shared";
|
|
2
2
|
import type { CoreCompactionContext, CoreCompactionResult, CoreCompactionSummarizerConfig } from "../../types/config";
|
|
3
3
|
import type { ProviderConfig } from "../../types/provider-settings";
|
|
4
|
+
import { type BudgetProjectionResult } from "./budget-projection";
|
|
4
5
|
import { type EstimateMessageTokens } from "./compaction-shared";
|
|
6
|
+
export declare function buildAgenticSummaryInputBudget(options: {
|
|
7
|
+
messages: CoreCompactionContext["messages"];
|
|
8
|
+
targetTokens: number;
|
|
9
|
+
estimateMessageTokens: EstimateMessageTokens;
|
|
10
|
+
}): BudgetProjectionResult;
|
|
5
11
|
export declare function runAgenticCompaction(options: {
|
|
6
12
|
context: CoreCompactionContext;
|
|
7
13
|
providerConfig: ProviderConfig;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { buildBudgetProjection, findLatestTypedUserMessageIndex, } from "./project";
|
|
2
|
+
export type { BlockBudgetClass, BudgetAction, BudgetActionKind, BudgetActionReason, BudgetPath, BudgetPolicyIntent, BudgetProjectionOptions, BudgetProjectionResult, BudgetProjectionWarning, ContentBlockBudgetClassification, LiveTailHandling, } from "./types";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MessageWithMetadata } from "@cline/shared";
|
|
2
|
+
import type { BudgetProjectionOptions, BudgetProjectionResult } from "./types";
|
|
3
|
+
export declare function findLatestTypedUserMessageIndex(messages: MessageWithMetadata[]): number;
|
|
4
|
+
export declare function buildBudgetProjection(options: BudgetProjectionOptions): BudgetProjectionResult;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ContentBlock, MessageWithMetadata } from "@cline/shared";
|
|
2
|
+
export type BudgetPolicyIntent = "agentic_summary" | "basic_compaction_projection" | "normal_provider_request";
|
|
3
|
+
export type BudgetActionKind = "truncated_text" | "dropped_block" | "dropped_message" | "preserved";
|
|
4
|
+
export type BudgetActionReason = "over_budget" | "unsafe_to_truncate" | "tool_pair_boundary" | "protected_live_tail";
|
|
5
|
+
export type LiveTailHandling = "included_verbatim" | "included_degraded" | "summarized_as_context" | "omitted_with_warning" | "preserved_out_of_band";
|
|
6
|
+
export type BlockBudgetClass = "text" | "thinking" | "tool_use" | "tool_result" | "unsafe_binary" | "unsafe_encrypted" | "opaque";
|
|
7
|
+
export interface BudgetPath {
|
|
8
|
+
messageIndex: number;
|
|
9
|
+
blockIndex?: number;
|
|
10
|
+
}
|
|
11
|
+
interface BaseBudgetAction {
|
|
12
|
+
path: BudgetPath;
|
|
13
|
+
originalSize: number;
|
|
14
|
+
finalSize: number;
|
|
15
|
+
}
|
|
16
|
+
export type BudgetMutationAction = (BaseBudgetAction & {
|
|
17
|
+
kind: "truncated_text";
|
|
18
|
+
reason: Extract<BudgetActionReason, "over_budget">;
|
|
19
|
+
}) | (BaseBudgetAction & {
|
|
20
|
+
kind: "dropped_block";
|
|
21
|
+
path: Required<BudgetPath>;
|
|
22
|
+
reason: Exclude<BudgetActionReason, "protected_live_tail">;
|
|
23
|
+
}) | (BaseBudgetAction & {
|
|
24
|
+
kind: "dropped_message";
|
|
25
|
+
reason: Exclude<BudgetActionReason, "protected_live_tail">;
|
|
26
|
+
});
|
|
27
|
+
export interface BudgetPreservedAction extends BaseBudgetAction {
|
|
28
|
+
kind: "preserved";
|
|
29
|
+
reason: Extract<BudgetActionReason, "protected_live_tail" | "tool_pair_boundary">;
|
|
30
|
+
}
|
|
31
|
+
export type BudgetAction = BudgetMutationAction | BudgetPreservedAction;
|
|
32
|
+
export type BudgetProjectionWarningCode = "budget_impossible" | "budget_unachievable_with_protections";
|
|
33
|
+
export interface BudgetProjectionWarning {
|
|
34
|
+
code: BudgetProjectionWarningCode;
|
|
35
|
+
message: string;
|
|
36
|
+
path?: BudgetPath;
|
|
37
|
+
}
|
|
38
|
+
export interface BudgetProjectionOptions {
|
|
39
|
+
messages: MessageWithMetadata[];
|
|
40
|
+
targetTokens: number;
|
|
41
|
+
policyIntent: BudgetPolicyIntent;
|
|
42
|
+
estimateMessageTokens: (message: MessageWithMetadata) => number;
|
|
43
|
+
}
|
|
44
|
+
export interface BudgetProjectionResult {
|
|
45
|
+
status: "ok" | "failed";
|
|
46
|
+
messages: MessageWithMetadata[];
|
|
47
|
+
actions: BudgetAction[];
|
|
48
|
+
liveTailHandling: LiveTailHandling;
|
|
49
|
+
estimatedTokens: number;
|
|
50
|
+
warnings: BudgetProjectionWarning[];
|
|
51
|
+
}
|
|
52
|
+
export interface ContentBlockBudgetClassification {
|
|
53
|
+
block: ContentBlock;
|
|
54
|
+
budgetClass: BlockBudgetClass;
|
|
55
|
+
canStringTruncate: boolean;
|
|
56
|
+
canDropWholeBlock: boolean;
|
|
57
|
+
}
|
|
58
|
+
export {};
|