@cline/core 0.0.38 → 0.0.39

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,7 +1,7 @@
1
1
  import type { AgentResult } from "@cline/shared";
2
2
  import type { HookEventPayload } from "../../hooks";
3
3
  import type { RuntimeCapabilities } from "../../runtime/capabilities";
4
- import type { PendingPromptsServiceApi, RestoreSessionInput, RestoreSessionResult, RuntimeHost, RuntimeHostSubscribeOptions, SendSessionInput, SessionAccumulatedUsage, StartSessionInput, StartSessionResult } from "../../runtime/host/runtime-host";
4
+ import type { PendingPromptsServiceApi, RestoreSessionInput, RestoreSessionResult, RuntimeHost, RuntimeHostSubscribeOptions, SendSessionInput, SessionUsageSummary, StartSessionInput, StartSessionResult } from "../../runtime/host/runtime-host";
5
5
  import type { CoreSettingsListInput, CoreSettingsMutationResult, CoreSettingsSnapshot, CoreSettingsToggleInput } from "../../settings";
6
6
  import type { CoreSessionEvent } from "../../types/events";
7
7
  import type { SessionRecord } from "../../types/sessions";
@@ -42,7 +42,7 @@ export declare class HubRuntimeHost implements RuntimeHost {
42
42
  private requestPendingPromptsList;
43
43
  private requestPendingPromptUpdate;
44
44
  private requestPendingPromptDelete;
45
- getAccumulatedUsage(sessionId: string): Promise<SessionAccumulatedUsage | undefined>;
45
+ getAccumulatedUsage(sessionId: string): Promise<SessionUsageSummary | undefined>;
46
46
  abort(sessionId: string, reason?: unknown): Promise<void>;
47
47
  stopSession(sessionId: string): Promise<void>;
48
48
  dispose(): Promise<void>;
@@ -1,8 +1,9 @@
1
1
  import type { SessionRecord as HubSessionRecord, SessionParticipant } from "@cline/shared";
2
+ import type { SessionAccumulatedUsage } from "../../runtime/host/runtime-host";
2
3
  import type { SessionRecord as LocalSessionRecord } from "../../types/sessions";
3
4
  export type HubSessionState = {
4
5
  createdByClientId: string;
5
6
  interactive: boolean;
6
7
  participants: Map<string, SessionParticipant>;
7
8
  };
8
- export declare function toHubSessionRecord(session: LocalSessionRecord, state?: HubSessionState): HubSessionRecord;
9
+ export declare function toHubSessionRecord(session: LocalSessionRecord, state?: HubSessionState, usage?: SessionAccumulatedUsage, aggregateUsage?: SessionAccumulatedUsage): HubSessionRecord;
package/dist/index.d.ts CHANGED
@@ -4,15 +4,15 @@
4
4
  * Core contracts, shared state utilities, and Node runtime services.
5
5
  */
6
6
  export * as Llms from "@cline/llms";
7
- export type { AddProviderActionRequest, AgentConfig, AgentEvent, AgentExtension, AgentExtension as AgentPlugin, // Public-facing alias for extensions
8
- AgentExtensionCommand, AgentExtensionCommand as AgentPluginCommand, AgentHooks, AgentMode, AgentResult, AgentRunResult, AgentRunStatus, AgentTool, AgentToolContext, AutomationEventEnvelope, BasicLogger, ChatRunTurnRequest, ChatRuntimeConfig, ChatStartSessionArtifacts, ChatStartSessionRequest, ChatTurnResult, ClineAccountActionRequest, ConnectorHookEvent, ContentBlock, EnterpriseAuthenticateRequest, EnterpriseAuthenticateResponse, EnterpriseStatusRequest, EnterpriseStatusResponse, EnterpriseSyncRequest, EnterpriseSyncResponse, FileContent, GetProviderModelsActionRequest, HookSessionContext, ImageContent, ITelemetryService, ListProvidersActionRequest, Message, MessageWithMetadata, OAuthProviderId, ProviderActionRequest, ProviderCatalogResponse, ProviderListItem, ProviderModel, ProviderOAuthLoginResponse, RuntimeLoggerConfig, SaveProviderSettingsActionRequest, SessionLineage, TEAM_LIFECYCLE_EVENT_TYPE, TEAM_PROGRESS_EVENT_TYPE, TeamProgressProjectionEvent, TelemetryArray, TelemetryMetadata, TelemetryObject, TelemetryPrimitive, TelemetryProperties, TelemetryValue, TextContent, ThinkingContent, ToolApprovalRequest, ToolApprovalResult, ToolPolicy, ToolResultContent, ToolUseContent, WorkspaceInfo, WorkspaceInfoSchema, WorkspaceManifest, WorkspaceManifestSchema, } from "@cline/shared";
7
+ export type { AddProviderActionRequest, AgentConfig, AgentEvent, AgentExtension as AgentPlugin, // Public-facing alias for extensions
8
+ AgentExtensionCommand, AgentExtensionCommand as AgentPluginCommand, AgentHooks, AgentMode, AgentResult, AgentRunResult, AgentRunStatus, AgentTool, AgentToolContext, AutomationEventEnvelope, BasicLogger, BasicLogger as Logger, ChatRunTurnRequest, ChatRuntimeConfig, ChatStartSessionArtifacts, ChatStartSessionRequest, ChatTurnResult, ClineAccountActionRequest, ConnectorHookEvent, ContentBlock, FileContent, GetProviderModelsActionRequest, HookSessionContext, ImageContent, ITelemetryService, ListProvidersActionRequest, Message, MessageWithMetadata, OAuthProviderId, ProviderActionRequest, ProviderCatalogResponse, ProviderListItem, ProviderModel, ProviderOAuthLoginResponse, RuntimeLoggerConfig, SaveProviderSettingsActionRequest, SessionLineage, TEAM_LIFECYCLE_EVENT_TYPE, TEAM_PROGRESS_EVENT_TYPE, TeamProgressProjectionEvent, TelemetryArray, TelemetryMetadata, TelemetryObject, TelemetryPrimitive, TelemetryProperties, TelemetryValue, TextContent, ThinkingContent, ToolApprovalRequest, ToolApprovalResult, ToolPolicy, ToolResultContent, ToolUseContent, WorkspaceInfo, WorkspaceInfoSchema, WorkspaceManifest, WorkspaceManifestSchema, } from "@cline/shared";
9
9
  export { buildClineSystemPrompt as getClineDefaultSystemPrompt, ContributionRegistry, createClineTelemetryServiceConfig, createClineTelemetryServiceMetadata, createContributionRegistry, createTool, emptyWorkspaceManifest, formatDisplayUserInput, noopBasicLogger, normalizeUserInput, parseUserCommandEnvelope, registerDisposable, } from "@cline/shared";
10
10
  export * from "@cline/shared/storage";
11
11
  export { type ClineAccountBalance, type ClineAccountOperations, type ClineAccountOrganization, type ClineAccountOrganizationBalance, type ClineAccountOrganizationUsageTransaction, type ClineAccountPaymentTransaction, ClineAccountService, type ClineAccountServiceOptions, type ClineAccountUsageTransaction, type ClineAccountUser, type ClineOrganization, executeClineAccountAction, type FeaturebaseTokenResponse, isClineAccountActionRequest, type ProviderActionExecutor, RpcClineAccountService, type UserRemoteConfigOrganization, type UserRemoteConfigResponse, } from "./account";
12
12
  export { createOAuthClientCallbacks, type OAuthClientCallbacksOptions, } from "./auth/client";
13
13
  export { completeClineDeviceAuth, createClineOAuthProvider, getValidClineCredentials, loginClineOAuth, refreshClineToken, startClineDeviceAuth, } from "./auth/cline";
14
14
  export { getValidOpenAICodexCredentials, isOpenAICodexTokenExpired, loginOpenAICodex, normalizeOpenAICodexCredentials, openaiCodexOAuthProvider, refreshOpenAICodexToken, } from "./auth/codex";
15
- export { createOcaOAuthProvider, createOcaRequestHeaders, DEFAULT_EXTERNAL_IDCS_CLIENT_ID, DEFAULT_EXTERNAL_IDCS_SCOPES, DEFAULT_EXTERNAL_IDCS_URL, DEFAULT_EXTERNAL_OCA_BASE_URL, DEFAULT_INTERNAL_IDCS_CLIENT_ID, DEFAULT_INTERNAL_IDCS_SCOPES, DEFAULT_INTERNAL_IDCS_URL, DEFAULT_INTERNAL_OCA_BASE_URL, generateOcaOpcRequestId, getValidOcaCredentials, loginOcaOAuth, OCI_HEADER_OPC_REQUEST_ID, refreshOcaToken, } from "./auth/oca";
15
+ export { createOcaOAuthProvider, createOcaRequestHeaders, generateOcaOpcRequestId, getValidOcaCredentials, loginOcaOAuth, refreshOcaToken, } from "./auth/oca";
16
16
  export type { LocalOAuthServer, LocalOAuthServerOptions, OAuthCallbackPayload, OAuthServerCloseInfo, OAuthServerListeningInfo, } from "./auth/server";
17
17
  export { startLocalOAuthServer } from "./auth/server";
18
18
  export type { OAuthCredentials, OAuthLoginCallbacks, OAuthPrompt, OAuthProviderInterface, OcaClientMetadata, OcaMode, OcaOAuthConfig, OcaOAuthEnvironmentConfig, OcaOAuthProviderOptions, OcaTokenResolution, } from "./auth/types";
@@ -23,19 +23,20 @@ export { discoverPluginModulePaths, loadAgentPluginFromPath, loadAgentPluginsFro
23
23
  export type { AvailableRuntimeCommand, CreateInstructionWatcherOptions, CreateRulesConfigDefinitionOptions, CreateSkillsConfigDefinitionOptions, CreateUserInstructionConfigServiceOptions, CreateWorkflowsConfigDefinitionOptions, ParseMarkdownFrontmatterResult, RuleConfig, SkillConfig, UnifiedConfigDefinition, UnifiedConfigFileCandidate, UnifiedConfigFileContext, UnifiedConfigRecord, UnifiedConfigWatcherEvent, UnifiedConfigWatcherOptions, UserInstructionConfig, UserInstructionConfigRecord, UserInstructionConfigService, UserInstructionConfigType, WorkflowConfig, } from "./extensions/config";
24
24
  export { createRulesConfigDefinition, createSkillsConfigDefinition, createUserInstructionConfigService, createWorkflowsConfigDefinition, parseRuleConfigFromMarkdown, parseSkillConfigFromMarkdown, parseWorkflowConfigFromMarkdown, RULES_CONFIG_DIRECTORY_NAME, resolveRulesConfigSearchPaths, resolveSkillsConfigSearchPaths, resolveWorkflowsConfigSearchPaths, SKILLS_CONFIG_DIRECTORY_NAME, UnifiedConfigFileWatcher, WORKFLOWS_CONFIG_DIRECTORY_NAME, } from "./extensions/config";
25
25
  export { type CreateDisabledMcpToolPoliciesOptions, type CreateDisabledMcpToolPolicyOptions, type CreateMcpToolsOptions, createDefaultMcpServerClientFactory, createDisabledMcpToolPolicies, createDisabledMcpToolPolicy, createMcpTools, hasMcpSettingsFile, InMemoryMcpManager, type LoadMcpSettingsOptions, loadMcpSettingsFile, type McpConnectionStatus, type McpManager, type McpManagerOptions, type McpServerClient, type McpServerClientFactory, type McpServerRegistration, type McpServerSnapshot, type McpServerTransportConfig, type McpSettingsFile, type McpSseTransportConfig, type McpStdioTransportConfig, type McpStreamableHttpTransportConfig, type McpToolCallRequest, type McpToolCallResult, type McpToolDescriptor, type McpToolNameTransform, type McpToolProvider, type RegisterMcpServersFromSettingsOptions, registerMcpServersFromSettingsFile, resolveDefaultMcpSettingsPath, resolveMcpServerRegistrations, } from "./extensions/mcp";
26
- export { type AgentTask, AgentTeam, AgentTeamsRuntime, type AgentTeamsRuntimeOptions, type BootstrapAgentTeamsOptions, type BootstrapAgentTeamsResult, bootstrapAgentTeams, buildDelegatedAgentConfig, buildTeamProgressSummary, type CreateAgentTeamsToolsOptions, createAgentTeamsTools, createDelegatedAgent, createDelegatedAgentConfigProvider, createSpawnAgentTool, type DelegatedAgentConfigProvider, type DelegatedAgentConnectionConfig, type DelegatedAgentKind, type DelegatedAgentRuntimeConfig, reviveTeamStateDates, type SpawnTeammateOptions, type SubAgentEndContext, type SubAgentStartContext, sanitizeTeamName, type TaskResult, type TeamEvent, type TeamMemberConfig, type TeamTeammateRuntimeConfig, toTeamProgressLifecycleEvent, } from "./extensions/tools/team";
26
+ export { type AgentTask, AgentTeam, AgentTeamsRuntime, type AgentTeamsRuntimeOptions, type BootstrapAgentTeamsOptions, type BootstrapAgentTeamsResult, bootstrapAgentTeams, buildDelegatedAgentConfig, buildTeamProgressSummary, type CreateAgentTeamsToolsOptions, createAgentTeamsTools, createDelegatedAgent, createDelegatedAgentConfigProvider, createSpawnAgentTool, type DelegatedAgentConfigProvider, type DelegatedAgentConnectionConfig, type DelegatedAgentKind, type DelegatedAgentRuntimeConfig, reviveTeamStateDates, type SpawnTeammateOptions, type SubAgentEndContext, type SubAgentStartContext, type TaskResult, type TeamEvent, type TeamMemberConfig, type TeamTeammateRuntimeConfig, toTeamProgressLifecycleEvent, } from "./extensions/tools/team";
27
27
  export { createAgentHooksExtension, createHookAuditHooks, createHookConfigFileExtension, createHookConfigFileHooks, createSubprocessHooks, HOOK_CONFIG_FILE_EVENT_MAP, HOOKS_CONFIG_DIRECTORY_NAME, type HookConfigFileEntry, HookConfigFileName, type HookEventName, HookEventNameSchema, type HookEventPayload, HookEventPayloadSchema, listHookConfigFiles, mergeAgentHooks, parseHookEventPayload, type RunHookOptions, type RunHookResult, type RunSubprocessEventOptions, type RunSubprocessEventResult, resolveHooksConfigSearchPaths, runHook, runSubprocessEvent, type SubprocessHookControl, type SubprocessHooksOptions, toHookConfigFileName, } from "./hooks";
28
28
  export type { CheckpointEntry, CheckpointMetadata, } from "./hooks/checkpoint-hooks";
29
29
  export * from "./hub";
30
30
  export { HubRuntimeHost } from "./hub/runtime-host/hub-runtime-host";
31
31
  export { RemoteRuntimeHost } from "./hub/runtime-host/remote-runtime-host";
32
+ export { buildRemoteConfigSessionBlobUploadMetadata, createRemoteConfigSessionMessagesArtifactUploader, type PreparedRemoteConfigCoreIntegration, type PrepareRemoteConfigCoreIntegrationOptions, prepareRemoteConfigCoreIntegration, REMOTE_CONFIG_SESSION_BLOB_UPLOAD_METADATA_KEY, readRemoteConfigSessionBlobUploadMetadata, registerRemoteConfigSessionBlobUpload, } from "./remote-config/integration";
32
33
  export type { RuntimeCapabilities } from "./runtime/capabilities";
33
34
  export { normalizeRuntimeCapabilities } from "./runtime/capabilities";
34
35
  export { listSessionHistoryFromBackend } from "./runtime/host/history";
35
36
  export type { SessionBackend } from "./runtime/host/host";
36
37
  export { createRuntimeHost, createRuntimeHost as createSessionHost, resolveSessionBackend, } from "./runtime/host/host";
37
38
  export { LocalRuntimeHost } from "./runtime/host/local-runtime-host";
38
- export type { PendingPromptMutationResult, PendingPromptsDeleteInput, PendingPromptsListInput, PendingPromptsRuntimeService, PendingPromptsServiceApi, PendingPromptsUpdateInput, RestoreSessionInput, RestoreSessionResult, RuntimeHost, RuntimeHost as SessionHost, RuntimeHostMode, RuntimeHostSubscribeOptions, SendSessionInput, SessionAccumulatedUsage, StartSessionInput, StartSessionResult, } from "./runtime/host/runtime-host";
39
+ export type { PendingPromptMutationResult, PendingPromptsDeleteInput, PendingPromptsListInput, PendingPromptsRuntimeService, PendingPromptsServiceApi, PendingPromptsUpdateInput, RestoreSessionInput, RestoreSessionResult, RuntimeHost, RuntimeHost as SessionHost, RuntimeHostMode, RuntimeHostSubscribeOptions, SendSessionInput, SessionAccumulatedUsage, SessionUsageSummary, StartSessionInput, StartSessionResult, } from "./runtime/host/runtime-host";
39
40
  export { splitCoreSessionConfig } from "./runtime/host/runtime-host";
40
41
  export { createTeamName, DefaultRuntimeBuilder, } from "./runtime/orchestration/runtime-builder";
41
42
  export type { BuiltRuntime, RuntimeBuilder, RuntimeBuilderInput, SessionRuntime, } from "./runtime/orchestration/session-runtime";