@cline/core 0.0.52 → 0.0.53-nightly.1782703376

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,4 +1,4 @@
1
- import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, ClineOrganization, FeaturebaseTokenResponse, UserRemoteConfigResponse } from "./types";
1
+ import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, ClineOrganization, ClineSubscriptionPlan, FeaturebaseTokenResponse, UserCurrentPlan, UserRemoteConfigResponse } from "./types";
2
2
  export interface ClineAccountServiceOptions {
3
3
  apiBaseUrl: string;
4
4
  getAuthToken: () => Promise<string | undefined | null>;
@@ -24,6 +24,10 @@ export declare class ClineAccountService {
24
24
  fetchUsageTransactions(userId?: string): Promise<ClineAccountUsageTransaction[]>;
25
25
  fetchPaymentTransactions(userId?: string): Promise<ClineAccountPaymentTransaction[]>;
26
26
  fetchUserOrganizations(): Promise<ClineAccountOrganization[]>;
27
+ fetchAvailableSubscriptionPlans(input?: {
28
+ type?: "individual" | "teams";
29
+ }): Promise<ClineSubscriptionPlan[]>;
30
+ fetchCurrentUserPlan(): Promise<UserCurrentPlan | undefined>;
27
31
  fetchOrganization(organizationId: string): Promise<ClineOrganization>;
28
32
  fetchOrganizationBalance(organizationId: string): Promise<ClineAccountOrganizationBalance>;
29
33
  fetchOrganizationUsageTransactions(input: {
@@ -1,3 +1,3 @@
1
1
  export { ClineAccountService, type ClineAccountServiceOptions, } from "./cline-account-service";
2
2
  export { type ClineAccountOperations, executeClineAccountAction, isClineAccountActionRequest, type ProviderActionExecutor, RpcClineAccountService, } from "./rpc";
3
- export type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, ClineOrganization, FeaturebaseTokenResponse, UserRemoteConfigOrganization, UserRemoteConfigResponse, } from "./types";
3
+ export type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, ClineOrganization, ClineSubscriptionPlan, FeaturebaseTokenResponse, UserCurrentPlan, UserRemoteConfigOrganization, UserRemoteConfigResponse, } from "./types";
@@ -73,6 +73,30 @@ export interface ClineAccountOrganizationBalance {
73
73
  export interface FeaturebaseTokenResponse {
74
74
  featurebaseJwt: string;
75
75
  }
76
+ export interface ClineSubscriptionPlan {
77
+ displayName?: string;
78
+ features?: {
79
+ included?: string[];
80
+ [key: string]: unknown;
81
+ };
82
+ id?: string;
83
+ interval?: string;
84
+ name?: string;
85
+ pricePerSeatCents?: number;
86
+ type?: string;
87
+ [key: string]: unknown;
88
+ }
89
+ export interface UserCurrentPlan {
90
+ cancelAt?: string;
91
+ canceledAt?: string;
92
+ currentPeriodEnd?: string;
93
+ currentPeriodStart?: string;
94
+ plan?: ClineSubscriptionPlan | null;
95
+ planHistoryId?: string;
96
+ subscriptionId?: string;
97
+ userId?: string;
98
+ [key: string]: unknown;
99
+ }
76
100
  export interface ClineAccountOrganizationUsageTransaction {
77
101
  aiInferenceProviderName: string;
78
102
  aiModelName: string;
@@ -1,4 +1,4 @@
1
- import type { BasicLogger } from "@cline/shared";
1
+ import { type BasicLogger } from "@cline/shared";
2
2
  import type { CoreCompactionContext, CoreCompactionResult } from "../../types/config";
3
3
  import { type EstimateMessageTokens } from "./compaction-shared";
4
4
  export declare function runBasicCompaction(options: {
@@ -1,10 +1,11 @@
1
1
  import type { ToolResultContent } from "@cline/llms";
2
- import { estimateTokens, type MessageWithMetadata } from "@cline/shared";
3
- export { estimateTokens };
2
+ import { CHARS_PER_TOKEN, estimateTokens, type MessageWithMetadata } from "@cline/shared";
3
+ export { CHARS_PER_TOKEN, estimateTokens };
4
4
  import type { CoreCompactionContext, CoreCompactionSummarizerConfig } from "../../types/config";
5
5
  import type { ProviderConfig } from "../../types/provider-settings";
6
6
  export declare const DEFAULT_MAX_INPUT_TOKENS = 200000;
7
7
  export declare const DEFAULT_THRESHOLD_RATIO = 0.9;
8
+ export declare const DEFAULT_TARGET_RATIO = 0.7;
8
9
  export declare const DEFAULT_RESERVE_TOKENS = 16384;
9
10
  export declare const DEFAULT_PRESERVE_RECENT_TOKENS = 20000;
10
11
  export declare const DEFAULT_SUMMARY_MAX_OUTPUT_TOKENS = 1024;