@cline/core 0.0.45 → 0.0.46

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,5 +1,5 @@
1
1
  import { type ITelemetryService } from "@cline/shared";
2
- import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderInterface } from "./types";
2
+ import type { OAuthCredentials, OAuthLoginCallbacks } from "./types";
3
3
  export type ClineTokenResolution = {
4
4
  forceRefresh?: boolean;
5
5
  refreshBufferMs?: number;
@@ -60,5 +60,4 @@ export declare function completeClineDeviceAuth(options: {
60
60
  }): Promise<ClineOAuthCredentials>;
61
61
  export declare function refreshClineToken(current: ClineOAuthCredentials, options: ClineOAuthProviderOptions): Promise<ClineOAuthCredentials>;
62
62
  export declare function getValidClineCredentials(currentCredentials: ClineOAuthCredentials | null, providerOptions: ClineOAuthProviderOptions, options?: ClineTokenResolution): Promise<ClineOAuthCredentials | null>;
63
- export declare function createClineOAuthProvider(options: ClineOAuthProviderOptions): OAuthProviderInterface;
64
63
  export {};
@@ -5,7 +5,7 @@
5
5
  * It is only intended for CLI use, not browser environments.
6
6
  */
7
7
  import type { ITelemetryService } from "@cline/shared";
8
- import type { OAuthCredentials, OAuthPrompt, OAuthProviderInterface } from "./types";
8
+ import type { OAuthCredentials, OAuthPrompt } from "./types";
9
9
  export declare const OPENAI_CODEX_OAUTH_CONFIG: {
10
10
  readonly authorizationEndpoint: "https://auth.openai.com/oauth/authorize";
11
11
  readonly tokenEndpoint: "https://auth.openai.com/oauth/token";
@@ -38,6 +38,3 @@ export declare function refreshOpenAICodexToken(refreshToken: string, fallback?:
38
38
  export declare function getValidOpenAICodexCredentials(currentCredentials: OAuthCredentials | null, options?: RefreshTokenResolution & {
39
39
  telemetry?: ITelemetryService;
40
40
  }): Promise<OAuthCredentials | null>;
41
- export declare function isOpenAICodexTokenExpired(credentials: OAuthCredentials, refreshBufferMs?: number): boolean;
42
- export declare function normalizeOpenAICodexCredentials(credentials: OAuthCredentials): OAuthCredentials;
43
- export declare const openaiCodexOAuthProvider: OAuthProviderInterface;
@@ -1,5 +1,5 @@
1
1
  import type { ITelemetryService } from "@cline/shared";
2
- import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderInterface, OcaClientMetadata, OcaOAuthProviderOptions, OcaTokenResolution } from "./types";
2
+ import type { OAuthCredentials, OAuthLoginCallbacks, OcaOAuthProviderOptions, OcaTokenResolution } from "./types";
3
3
  export declare const DEFAULT_INTERNAL_IDCS_CLIENT_ID = "a8331954c0cf48ba99b5dd223a14c6ea";
4
4
  export declare const DEFAULT_INTERNAL_IDCS_URL = "https://idcs-9dc693e80d9b469480d7afe00e743931.identity.oraclecloud.com";
5
5
  export declare const DEFAULT_INTERNAL_IDCS_SCOPES = "openid offline_access";
@@ -19,10 +19,3 @@ export declare function getValidOcaCredentials(currentCredentials: OAuthCredenti
19
19
  }, providerOptions?: OcaOAuthProviderOptions & {
20
20
  telemetry?: ITelemetryService;
21
21
  }): Promise<OAuthCredentials | null>;
22
- export declare function createOcaOAuthProvider(options?: OcaOAuthProviderOptions): OAuthProviderInterface;
23
- export declare function generateOcaOpcRequestId(taskId: string, token: string): Promise<string>;
24
- export declare function createOcaRequestHeaders(input: {
25
- accessToken: string;
26
- taskId: string;
27
- metadata?: OcaClientMetadata;
28
- }): Promise<Record<string, string>>;
@@ -0,0 +1,52 @@
1
+ import { type ITelemetryService } from "@cline/shared";
2
+ import type { ProviderSettingsManager } from "../services/storage/provider-settings-manager";
3
+ import type { ProviderSettings } from "../types/provider-settings";
4
+ import type { OAuthCredentials, OAuthLoginCallbacks } from "./types";
5
+ export type ProviderOAuthCredentials = OAuthCredentials;
6
+ export interface ProviderAuthLoginInput {
7
+ settings?: ProviderSettings;
8
+ callbacks: OAuthLoginCallbacks;
9
+ telemetry?: ITelemetryService;
10
+ }
11
+ export interface ProviderAuthRefreshInput {
12
+ settings: ProviderSettings;
13
+ credentials: ProviderOAuthCredentials;
14
+ forceRefresh?: boolean;
15
+ telemetry?: ITelemetryService;
16
+ }
17
+ export interface ProviderAuthSaveCredentialsInput {
18
+ manager: ProviderSettingsManager;
19
+ settings?: ProviderSettings;
20
+ credentials: ProviderOAuthCredentials;
21
+ setLastUsed?: boolean;
22
+ save?: boolean;
23
+ }
24
+ export interface ProviderAuthHandler {
25
+ providerId: string;
26
+ storageProviderId: string;
27
+ getApiKey(settings: ProviderSettings | undefined): string | undefined;
28
+ login(input: ProviderAuthLoginInput): Promise<ProviderOAuthCredentials>;
29
+ refresh(input: ProviderAuthRefreshInput): Promise<ProviderOAuthCredentials | null>;
30
+ saveCredentials(input: ProviderAuthSaveCredentialsInput): ProviderSettings;
31
+ isConfigured(settings: ProviderSettings | undefined): boolean;
32
+ normalizeStoredAccessToken?(accessToken: string): string;
33
+ }
34
+ export declare function getProviderAuthHandler(providerId: string): ProviderAuthHandler | undefined;
35
+ export declare function isOAuthProvider(providerId: string): boolean;
36
+ export declare function getProviderAuthStorageId(providerId: string): string | undefined;
37
+ export declare function resolveProviderApiKeyFromSettings(manager: ProviderSettingsManager, providerId: string): string | undefined;
38
+ export declare function loginAndSaveProviderOAuthCredentials(manager: ProviderSettingsManager, providerId: string, input: {
39
+ callbacks: OAuthLoginCallbacks;
40
+ telemetry?: ITelemetryService;
41
+ }): Promise<ProviderSettings>;
42
+ export declare function getProviderOAuthCredentialsFromSettings(providerId: string, settings: ProviderSettings): ProviderOAuthCredentials | null;
43
+ export declare function saveProviderOAuthCredentials(input: {
44
+ manager: ProviderSettingsManager;
45
+ providerId: string;
46
+ settings?: ProviderSettings;
47
+ credentials: ProviderOAuthCredentials;
48
+ setLastUsed?: boolean;
49
+ save?: boolean;
50
+ }): ProviderSettings;
51
+ export declare function getPersistedProviderApiKey(providerId: string, settings?: ProviderSettings): string | undefined;
52
+ export declare function formatProviderOAuthApiKey(providerId: string, credentials: Pick<ProviderOAuthCredentials, "access">): string;
@@ -1,4 +1,5 @@
1
1
  import type { AgentExtension } from "@cline/shared";
2
+ import type { SkillsExecutorWithMetadata } from "../tools";
2
3
  import { type AvailableRuntimeCommand } from "./runtime-commands";
3
4
  import { type CreateUserInstructionConfigWatcherOptions, type UserInstructionConfig, type UserInstructionConfigType } from "./user-instruction-config-loader";
4
5
  import { type CreateUserInstructionPluginOptions } from "./user-instruction-plugin";
@@ -18,6 +19,7 @@ export interface UserInstructionConfigService {
18
19
  listRuntimeCommands(): AvailableRuntimeCommand[];
19
20
  resolveRuntimeSlashCommand(input: string): string;
20
21
  hasConfiguredSkills(allowedSkillNames?: ReadonlyArray<string>): boolean;
22
+ createSkillsExecutor?(allowedSkillNames?: ReadonlyArray<string>): SkillsExecutorWithMetadata;
21
23
  createExtension(options: Omit<CreateUserInstructionPluginOptions, "watcher" | "watcherReady">): AgentExtension;
22
24
  }
23
25
  export declare function createUserInstructionConfigService(options?: CreateUserInstructionConfigServiceOptions): UserInstructionConfigService;
@@ -0,0 +1,26 @@
1
+ export interface ConfiguredAgentConfig {
2
+ name: string;
3
+ description: string;
4
+ tools?: string[];
5
+ skills?: string[];
6
+ providerId?: string;
7
+ modelId?: string;
8
+ maxIterations?: number;
9
+ systemPrompt: string;
10
+ path?: string;
11
+ }
12
+ export interface ConfiguredAgentReadError {
13
+ path: string;
14
+ error: Error;
15
+ }
16
+ export interface ConfiguredAgentLoadResult {
17
+ configs: ConfiguredAgentConfig[];
18
+ errors: ConfiguredAgentReadError[];
19
+ }
20
+ export declare function parseConfiguredAgentConfig(content: string, options?: {
21
+ path?: string;
22
+ }): ConfiguredAgentConfig;
23
+ export declare function loadConfiguredAgentConfigs(input: {
24
+ workspaceRoot?: string;
25
+ searchPaths?: string[];
26
+ }): ConfiguredAgentLoadResult;
@@ -0,0 +1,28 @@
1
+ import { type AgentEvent, type AgentTool, type AgentToolContext, type HookErrorMode, type ToolApprovalRequest, type ToolApprovalResult, type ToolPolicy } from "@cline/shared";
2
+ import { z } from "zod";
3
+ import type { ConfiguredAgentConfig } from "./configured-agent-config";
4
+ import { type DelegatedAgentConfigProvider } from "./delegated-agent";
5
+ import type { SubAgentEndContext, SubAgentStartContext } from "./spawn-agent-tool";
6
+ declare const ConfiguredAgentInputSchema: z.ZodObject<{
7
+ prompt: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type ConfiguredAgentInput = z.infer<typeof ConfiguredAgentInputSchema>;
10
+ export interface ConfiguredAgentToolDescriptor {
11
+ toolName: string;
12
+ config: ConfiguredAgentConfig;
13
+ }
14
+ export interface ConfiguredAgentToolConfig {
15
+ configProvider: DelegatedAgentConfigProvider;
16
+ agents: ConfiguredAgentConfig[];
17
+ createSubAgentTools?: (agent: ConfiguredAgentConfig, input: ConfiguredAgentInput, context: AgentToolContext) => AgentTool[] | Promise<AgentTool[]>;
18
+ onSubAgentEvent?: (event: AgentEvent) => void;
19
+ hookErrorMode?: HookErrorMode;
20
+ toolPolicies?: Record<string, ToolPolicy>;
21
+ requestToolApproval?: (request: ToolApprovalRequest) => Promise<ToolApprovalResult> | ToolApprovalResult;
22
+ onSubAgentStart?: (context: SubAgentStartContext) => void | Promise<void>;
23
+ onSubAgentEnd?: (context: SubAgentEndContext) => void | Promise<void>;
24
+ }
25
+ export declare function buildConfiguredAgentToolName(agentName: string): string;
26
+ export declare function buildConfiguredAgentToolDescriptors(agents: readonly ConfiguredAgentConfig[]): ConfiguredAgentToolDescriptor[];
27
+ export declare function createConfiguredAgentTools(options: ConfiguredAgentToolConfig): AgentTool[];
28
+ export {};
@@ -1,2 +1,5 @@
1
+ export { type ConfiguredAgentConfig, type ConfiguredAgentLoadResult, type ConfiguredAgentReadError, loadConfiguredAgentConfigs, parseConfiguredAgentConfig, } from "./configured-agent-config";
2
+ export { buildConfiguredAgentToolDescriptors, buildConfiguredAgentToolName, type ConfiguredAgentInput, type ConfiguredAgentToolConfig, type ConfiguredAgentToolDescriptor, createConfiguredAgentTools, } from "./configured-agent-tool";
1
3
  export { buildTeamProgressSummary, toTeamProgressLifecycleEvent, } from "./projections";
2
4
  export * from "./runtime";
5
+ export type { SubAgentEndContext, SubAgentStartContext, } from "./spawn-agent-tool";