@cline/core 0.0.95 → 0.2.0-nightly.1793312794

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.
Files changed (175) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/account/types.d.ts +2 -0
  4. package/dist/artifacts/cloud/fetch.d.ts +8 -0
  5. package/dist/artifacts/cloud/publish.d.ts +6 -0
  6. package/dist/artifacts/publish.d.ts +30 -0
  7. package/dist/cline-core/runtime-services.d.ts +4 -2
  8. package/dist/cloud/computer-use-prompt.d.ts +9 -0
  9. package/dist/cloud/controller.d.ts +26 -4
  10. package/dist/cloud/hub-client.d.ts +53 -0
  11. package/dist/cloud/hub-protocol.d.ts +32 -0
  12. package/dist/cloud/index.d.ts +5 -0
  13. package/dist/cloud/index.js +34 -17
  14. package/dist/cloud/types.d.ts +4 -1
  15. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  16. package/dist/extensions/context/compaction.d.ts +7 -0
  17. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  18. package/dist/extensions/context/summary-generation.d.ts +14 -0
  19. package/dist/extensions/mcp/apps.d.ts +16 -0
  20. package/dist/extensions/mcp/client.d.ts +1 -0
  21. package/dist/extensions/mcp/index.d.ts +5 -1
  22. package/dist/extensions/mcp/manager.d.ts +2 -1
  23. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  24. package/dist/extensions/mcp/types.d.ts +22 -0
  25. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  26. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  27. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  28. package/dist/hub/client/index.d.ts +6 -0
  29. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  30. package/dist/hub/client/plugin-commands.d.ts +4 -0
  31. package/dist/hub/client/session-client.d.ts +2 -0
  32. package/dist/hub/daemon/entry.js +248 -229
  33. package/dist/hub/daemon/index.d.ts +2 -0
  34. package/dist/hub/index.d.ts +1 -0
  35. package/dist/hub/index.js +238 -219
  36. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  37. package/dist/hub/server/cloud-session-service.d.ts +52 -0
  38. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  39. package/dist/hub/server/handlers/context.d.ts +13 -2
  40. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  41. package/dist/hub/server/handlers/session-handlers.d.ts +4 -0
  42. package/dist/hub/server/hub-server-options.d.ts +3 -0
  43. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  44. package/dist/index.d.ts +10 -5
  45. package/dist/index.js +284 -258
  46. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  47. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-bdvd54cj.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-d88t4w67.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-4rh6dw0e.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-dex049wz.js +1 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +38 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-adrseffv.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-vf44v1q1.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-np6pavev.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-1xg0n8py.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-2h2811k3.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-918h9zb6.js +2 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-9g9qz8kw.js +2 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-8p52y0t4.js +1 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-cr4wnstr.js +1 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-aa72jh2v.js +1 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-k2y10eep.js +1 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-1hvm2h6v.js +1 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-7nqbajdc.js +1 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-nqn5r579.js +1 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1166 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1153 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0ahmqye5.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1jwj53tz.js +2 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-3qy7846d.js +14 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-418gvd4a.js +2 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4etvmc8g.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4pm9q9we.js +1 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4tgv599k.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5hwscy9s.js +15 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6dpcn5cw.js +9 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-7ycwqbm0.js +1 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8qjtgvqw.js +9 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8zb5grad.js +1210 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-94jdgxt6.js +2 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9g67p34k.js +2 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-a9d2sjh0.js +85 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-agemt17a.js +3 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bhf7enwn.js +1 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bnwxdgvg.js +1 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-brjxtvsh.js +4 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bvb7f701.js +1 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bwet95hr.js +2 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cadyf2yp.js +14 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cxfnnrmh.js +9 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cyyvppz9.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d4pbedxj.js +137 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ddwn220p.js +12 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-edf1hmcw.js +62 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ejyd73x5.js +1 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f25bf131.js +4 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f4rfmj6q.js +3 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-fet3kwk6.js +1 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ffna8yzn.js +121 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-g2y6ptdc.js +213 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ge184xvn.js +6 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-gevnedsc.js +13 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkmarmve.js +190 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-kqacxn3s.js +39 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m3gtj35r.js +14 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-neczvge6.js +21 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-p5k5hnam.js +75 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sdvqs19c.js +20 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t75m2pgm.js +146 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-qqb2kabr.js +1 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v6mehmme.js +12 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v80fh3x3.js +16 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vd605jwp.js +2 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vryppqt1.js +1 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w55v4n1n.js +2 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w9n2kgjk.js +140 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yjbp9r76.js +142 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ztb3cjfh.js +3 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-kj4rdeey.js +473 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-y9tt7gmq.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-bg81k3qh.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-tkbfbx5w.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-mkw95amh.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-9z19cm6q.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-sjp09b7p.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-1eyn4hw0.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-f99c7syq.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-19936r1a.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-eavx3zc3.js +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  133. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-04d0mwe8.js +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-mt7pvm61.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-6armtc3s.js +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  138. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  139. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  140. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  146. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  147. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  148. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  149. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  150. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  151. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  152. package/dist/plugin-runtime/package.json +1 -0
  153. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  154. package/dist/remote/remote-environments.d.ts +1 -0
  155. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  156. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  157. package/dist/runtime/host/runtime-host.d.ts +6 -0
  158. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  159. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  160. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  161. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  162. package/dist/services/cloud-handoff/git-preparation.d.ts +22 -0
  163. package/dist/services/global-settings.d.ts +6 -0
  164. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  165. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  166. package/dist/services/plugin-command-api.d.ts +47 -0
  167. package/dist/services/plugin-commands.d.ts +25 -27
  168. package/dist/services/skills-cli.d.ts +2 -0
  169. package/dist/services/telemetry/core-events.d.ts +26 -0
  170. package/dist/services/telemetry/index.js +1 -1
  171. package/dist/services/telemetry/run-health.d.ts +40 -0
  172. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  173. package/dist/types/config.d.ts +1 -0
  174. package/dist/types/session.d.ts +7 -0
  175. package/package.json +6 -5
@@ -1,6 +1,7 @@
1
1
  import type { ClineCoreAutomationApi, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, CompareCheckpointInput, CompareCheckpointResult, RestoreInput, RestoreResult } from "./cline-core/types";
2
- import type { PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
2
+ import type { McpAppsRuntimeService, PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
3
3
  import { FeatureFlagsService } from "./services/feature-flags";
4
+ import type { PluginCommandsApi } from "./services/plugin-command-api";
4
5
  import { type SessionDisplayMessage } from "./session/display-messages";
5
6
  import type { CoreSessionEvent } from "./types/events";
6
7
  import type { SessionHistoryRecord } from "./types/sessions";
@@ -21,6 +22,7 @@ export declare class ClineCore {
21
22
  readonly runtimeAddress: string | undefined;
22
23
  readonly automation: ClineCoreAutomationApi;
23
24
  readonly settings: ClineCoreSettingsApi;
25
+ readonly pluginCommands: PluginCommandsApi;
24
26
  readonly featureFlags: FeatureFlagsService;
25
27
  readonly pendingPrompts: PendingPromptsServiceApi;
26
28
  private readonly host;
@@ -327,4 +329,7 @@ export declare class ClineCore {
327
329
  * an active session.
328
330
  */
329
331
  updateSessionConnection: SessionConnectionRuntimeService["updateSessionConnection"];
332
+ resolveMcpAppTool: McpAppsRuntimeService["resolveMcpAppTool"];
333
+ readMcpAppResource: McpAppsRuntimeService["readMcpAppResource"];
334
+ callMcpAppTool: McpAppsRuntimeService["callMcpAppTool"];
330
335
  }
@@ -1,5 +1,5 @@
1
1
  import type { ClineAccountActionRequest, ProviderActionRequest } from "@cline/shared";
2
- import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, FeaturebaseTokenResponse } from "./types";
2
+ import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, FeaturebaseTokenResponse, UserCurrentPlan } from "./types";
3
3
  export interface ClineAccountOperations {
4
4
  fetchMe(): Promise<ClineAccountUser>;
5
5
  fetchBalance(userId?: string): Promise<ClineAccountBalance>;
@@ -13,6 +13,7 @@ export interface ClineAccountOperations {
13
13
  }): Promise<ClineAccountOrganizationUsageTransaction[]>;
14
14
  switchAccount(organizationId?: string | null): Promise<void>;
15
15
  fetchFeaturebaseToken?(): Promise<FeaturebaseTokenResponse | undefined>;
16
+ fetchCurrentUserPlan?(): Promise<UserCurrentPlan | undefined>;
16
17
  }
17
18
  export declare function isClineAccountActionRequest(request: ProviderActionRequest): request is ClineAccountActionRequest;
18
19
  export declare function executeClineAccountAction(request: ClineAccountActionRequest, service: ClineAccountOperations): Promise<unknown>;
@@ -36,5 +37,6 @@ export declare class RpcClineAccountService implements ClineAccountOperations {
36
37
  }): Promise<ClineAccountOrganizationUsageTransaction[]>;
37
38
  switchAccount(organizationId?: string | null): Promise<void>;
38
39
  fetchFeaturebaseToken(): Promise<FeaturebaseTokenResponse | undefined>;
40
+ fetchCurrentUserPlan(): Promise<UserCurrentPlan | undefined>;
39
41
  private request;
40
42
  }
@@ -13,6 +13,8 @@ export interface ClineAccountUser {
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  organizations: ClineAccountOrganization[];
16
+ /** Web app path where the user manages data use and Cline Bench preferences. */
17
+ dataPrivacyPath?: string;
16
18
  }
17
19
  export interface UserRemoteConfigOrganization {
18
20
  organizationId: string;
@@ -0,0 +1,8 @@
1
+ import type { ConnectorsRequest } from "../../extensions/composio/composio-meta-tools";
2
+ export declare function createArtifactFetcher({ request, cloudSessionId, }: {
3
+ request: ConnectorsRequest;
4
+ cloudSessionId: string;
5
+ }): ({ artifactId, signal, }: {
6
+ artifactId: string;
7
+ signal?: AbortSignal;
8
+ }) => Promise<Response>;
@@ -0,0 +1,6 @@
1
+ import type { ConnectorsRequest } from "../../extensions/composio/composio-meta-tools";
2
+ import { type ArtifactPublisher } from "../publish";
3
+ export declare function createArtifactPublisher({ request, cloudSessionId, }: {
4
+ request: ConnectorsRequest;
5
+ cloudSessionId: string;
6
+ }): ArtifactPublisher;
@@ -0,0 +1,30 @@
1
+ export type ArtifactPublicationResult = {
2
+ path: string;
3
+ artifactId: string;
4
+ } | {
5
+ path: string;
6
+ artifactId?: string;
7
+ error: {
8
+ code: string;
9
+ message: string;
10
+ };
11
+ };
12
+ export type ArtifactPublicationFile = {
13
+ path: string;
14
+ artifactId: string;
15
+ size: number;
16
+ modifiedAt: number;
17
+ };
18
+ export type ArtifactPublisher = (files: readonly ArtifactPublicationFile[], options: {
19
+ signal?: AbortSignal;
20
+ }) => Promise<ArtifactPublicationResult[]>;
21
+ export declare class ArtifactPublicationError extends Error {
22
+ code: string;
23
+ constructor(code: string, message: string);
24
+ }
25
+ export declare function publicationFailure(path: string, error: unknown, artifactId?: string, signal?: AbortSignal): ArtifactPublicationResult;
26
+ export declare function createPublishArtifactsTool({ publish, }: {
27
+ publish: ArtifactPublisher;
28
+ }): import("@cline/shared").AgentTool<unknown, {
29
+ files: ArtifactPublicationResult[];
30
+ }>;
@@ -1,5 +1,7 @@
1
- import type { PendingPromptsRuntimeService, PendingPromptsServiceApi, RuntimeHost, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService } from "../runtime/host/runtime-host";
1
+ import type { McpAppsRuntimeService, PendingPromptsRuntimeService, PendingPromptsServiceApi, RuntimeHost, SessionConnectionRuntimeService, SessionModelRuntimeService, SessionUsageRuntimeService } from "../runtime/host/runtime-host";
2
+ import type { PluginCommandsApi } from "../services/plugin-command-api";
2
3
  import { type ClineCoreSettingsApi } from "../settings";
3
- export type RuntimeHostServiceExtensions = RuntimeHost & Partial<PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionConnectionRuntimeService & SessionModelRuntimeService>;
4
+ export type RuntimeHostServiceExtensions = RuntimeHost & Partial<PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionConnectionRuntimeService & SessionModelRuntimeService & McpAppsRuntimeService>;
4
5
  export declare function createClineCoreSettingsApi(host: RuntimeHost): ClineCoreSettingsApi;
5
6
  export declare function createClineCorePendingPromptsApi(host: RuntimeHost): PendingPromptsServiceApi;
7
+ export declare function createClineCorePluginCommandsApi(host: RuntimeHost): PluginCommandsApi;
@@ -0,0 +1,9 @@
1
+ /** Lets local development enable cloud computer use without the rollout flag. */
2
+ export declare const CLOUD_COMPUTER_USE_ENV = "CLINE_CLOUD_COMPUTER_USE";
3
+ /**
4
+ * Screenshots only help a model that can see them. Models missing from the
5
+ * bundled catalog are treated as text-only so the section never reaches a
6
+ * model whose `read_files` would reject images.
7
+ */
8
+ export declare function cloudModelSupportsImages(modelId: string): boolean;
9
+ export declare const CLOUD_COMPUTER_USE_PROMPT = "## Verify your work visually\n\nThis sandbox may have a virtual display and standard Linux tools for computer use: Xvfb, xdotool, ImageMagick (`import`), wmctrl, and Chromium. Check with `command -v Xvfb xdotool import chromium` the first time you need them. If any are missing, skip visual verification and don't try to install them. To see a screenshot, call `read_files` on the image file.\n\n### When to verify\n\nUse your judgment. Verify when a change affects something a user sees or interacts with (a navbar style, a new dialog, a form flow, a terminal UI). Skip it when there's nothing to look at (a git operation, a config tweak, a refactor with no visible effect).\n\n### Display, input, and screenshots\n\n- Start the display if it isn't running: `Xvfb :99 -screen 0 1280x800x24 -nolisten tcp &`, and run every GUI command with `DISPLAY=:99` (for example `export DISPLAY=:99` at the start of the command). Keep the display as small as the check allows so screenshots stay legible. To check a phone layout, restart Xvfb at 390x844 and relaunch the app window at 0,0 with the same size.\n- Start the app (for example `bun run dev &`) and wait until it's serving.\n- Open web apps in a normal Chromium window so screenshots look like a real browser:\n `chromium --new-window http://localhost:5173 --remote-debugging-port=9222 --window-position=0,0 --window-size=1280,800 --force-device-scale-factor=1 --user-data-dir=\"$(mktemp -d)\" --no-first-run --no-default-browser-check --disable-features=Translate --disable-gpu --no-sandbox &`\n - `--remote-debugging-port=9222` exposes the Chrome DevTools Protocol, so you can inspect the DOM, console, and network when a screenshot alone doesn't explain a problem.\n - A fixed position and size, plus `--force-device-scale-factor=1`, keep screenshot pixels equal to click coordinates.\n - A fresh `--user-data-dir` and the first-run flags keep restore prompts and popups out of screenshots. `--disable-gpu` and `--no-sandbox` are needed in this container.\n- Drive the app with xdotool: `key`, `type --delay 40 --`, `mousemove X Y click 1` (buttons 4 and 5 scroll). Find the window with `xdotool search --sync --onlyvisible --class chromium | tail -1` and focus it with `xdotool windowfocus --sync <id>`.\n- Take screenshots of the whole display, for example `import -window root /tmp/cu-shots/03-filtered.png`, so every frame has the same size and framing. Wait about half a second after each action so the UI settles. To look closely at one area, crop a copy instead of capturing a region.\n- Take a fresh screenshot before every click and click in that screenshot's coordinates; layouts move. If a click misses, look again before retrying.\n- Move the pointer out of the way before screenshots you'll show the user, so hover states don't leak in.\n\nExample of a loop that works well:\n\n```bash\nexport DISPLAY=:99\nmkdir -p /tmp/cu-shots\nWID=$(xdotool search --sync --onlyvisible --class chromium | tail -1)\nxdotool windowfocus --sync \"$WID\"\nxdotool key ctrl+k && sleep 0.5 && import -window root /tmp/cu-shots/01-palette.png\nxdotool type --delay 40 -- \"over\" && sleep 0.5 && import -window root /tmp/cu-shots/02-search.png\nxdotool mousemove 640 228 click 1 && sleep 0.5 && import -window root /tmp/cu-shots/03-filtered.png\n```\n\n### What to check\n\n- Check the states that usually break: empty, loading, error, long content, dark mode, and a narrow viewport.\n- If something looks wrong, fix it, reload, and check again.\n- Read only the screenshots you need; each one costs context (about 1.4k tokens at 1280x800).\n- Never close the window you're testing, and never put secrets (tokens, passwords, `.env` contents) on screen.\n\n### Show the user what you verified\n\nThe user can't see this sandbox, and its files disappear when it stops. When you've verified something, publish the few screenshots that prove it with the `publish_artifacts` tool, which uploads them to this session so the user can open them. Pass absolute paths, for example `{\"files\": [{\"path\": \"/tmp/cu-shots/01-palette.png\"}, {\"path\": \"/tmp/cu-shots/03-filtered.png\"}]}`.\n\n- Publish frames for the reader, not a log of every input: usually 1 to 8 per thing you verified, in the order that tells the story (at most 20 per call).\n- The tool reports an `artifactId` or an `error` for each file. To retry a failed file, pass the same `artifactId` back. If publishing fails or the tool isn't available, say so in your answer and carry on.\n- In your answer, say what each published screenshot shows, in order, and call out anything you couldn't fix.";
@@ -3,10 +3,17 @@ import { NodeHubClient } from "../hub/client/index";
3
3
  import { type CloudSessionApi, CloudSessionError, type CloudSessionRecord, type CreateCloudSessionInput } from "./api";
4
4
  import { type CloudModel } from "./models";
5
5
  import type { CloudBranchListOptions, CloudBranchListResult, CloudRepositoryListResult } from "./repositories";
6
- import type { CloudCreationOptions, CloudHandoffSeed, CloudSessionAttachment, CloudSessionEvent, CloudSessionSnapshot, CloudSessionState, JsonRecord } from "./types";
6
+ import type { CloudCreationOptions, CloudHandoffSeed, CloudSendLifecycle, CloudSessionAttachment, CloudSessionEvent, CloudSessionSnapshot, CloudSessionState, JsonRecord } from "./types";
7
+ type CloudSendFailure = {
8
+ dispatched: boolean;
9
+ message: string;
10
+ detail?: string;
11
+ };
7
12
  export declare const CLOUD_SESSION_SYSTEM_PROMPT: string;
8
13
  /** The prompt a new cloud task starts with: GitHub access plus its work-branch rules. */
9
- export declare function buildCloudSessionSystemPrompt(record: Pick<CloudSessionRecord, "id" | "sandboxType" | "metadata">): string;
14
+ export declare function buildCloudSessionSystemPrompt(record: Pick<CloudSessionRecord, "id" | "sandboxType" | "metadata">, options?: {
15
+ computerUse?: boolean;
16
+ }): string;
10
17
  /** The seed command was not dispatched; the host may clear its seed marker. */
11
18
  export declare class CloudHandoffSeedRejectedError extends Error {
12
19
  constructor(cause: unknown);
@@ -31,6 +38,8 @@ export type CloudSessionControllerOptions = {
31
38
  lateCreateDisposition?: "preserve" | "delete";
32
39
  /** Host-owned first-task policy survives controller replacement; established tasks never qualify. */
33
40
  pendingInitialTasks?: Map<string, CloudCreationOptions>;
41
+ /** Rollout gate for the computer-use prompt section; omitted means off. */
42
+ isComputerUseEnabled?: () => Promise<boolean>;
34
43
  api: Pick<CloudSessionApi, "create" | "resume" | "delete" | "list" | "status" | "waitUntilReady" | "history" | "updateTitle" | "listRepositories" | "listBranches">;
35
44
  getAuthToken: () => Promise<string | undefined>;
36
45
  apiBaseUrl: string;
@@ -58,9 +67,11 @@ export declare class CloudSessionController {
58
67
  private readonly unlistedSessions;
59
68
  private readonly pendingInitialTasks;
60
69
  private lastListedSessions;
70
+ private lastListedOrganizationId?;
61
71
  private discoveryRefresh?;
62
72
  private readonly unconfirmedInnerCreates;
63
73
  private readonly createRequests;
74
+ private readonly initialSends;
64
75
  private readonly provisioningControllers;
65
76
  private readonly sendAbortTokens;
66
77
  private readonly titleWrites;
@@ -90,8 +101,10 @@ export declare class CloudSessionController {
90
101
  /** Revalidates a cached row by id when the active-scope list does not include it. */
91
102
  getCrossScopeDiscoveryRecord(sessionId: string): Promise<JsonRecord | undefined>;
92
103
  list(): Promise<CloudSessionRecord[]>;
104
+ private listInOrganization;
93
105
  handoffTargetExists(sessionId: string): Promise<boolean>;
94
106
  private preserveConnectedRuntimeModel;
107
+ refreshOrganization(): Promise<void>;
95
108
  private resolveActiveOrganizationId;
96
109
  listRepositories(): Promise<CloudRepositoryListResult>;
97
110
  listModels(): Promise<CloudModel[]>;
@@ -103,7 +116,15 @@ export declare class CloudSessionController {
103
116
  listForDiscovery(options?: {
104
117
  timeoutMs?: number;
105
118
  }): Promise<JsonRecord[]>;
106
- create(input: CreateCloudSessionInput): Promise<CloudSessionAttachment>;
119
+ create(input: CreateCloudSessionInput & {
120
+ initialMessage?: {
121
+ text: string;
122
+ images?: string[];
123
+ };
124
+ }): Promise<CloudSessionAttachment & {
125
+ initialSend?: Awaited<ReturnType<CloudSessionController["send"]>> | CloudSendFailure;
126
+ }>;
127
+ private createSession;
107
128
  private trackProvisioningController;
108
129
  private abortProvisioningControllers;
109
130
  /** Waits for an adopted pending handoff target before opening its Hub proxy. */
@@ -118,7 +139,7 @@ export declare class CloudSessionController {
118
139
  private createOnce;
119
140
  private deleteProvisionedSessionAfterDispose;
120
141
  attach(outerSessionId: string, creationOptions?: CloudCreationOptions): Promise<CloudSessionAttachment>;
121
- send(outerSessionId: string, prompt: string, requestedDelivery?: "queue" | "steer", modelId?: string, userImages?: string[]): Promise<{
142
+ send(outerSessionId: string, prompt: string, requestedDelivery?: "queue" | "steer", modelId?: string, userImages?: string[], lifecycle?: CloudSendLifecycle): Promise<{
122
143
  sessionId: string;
123
144
  ok: true;
124
145
  queued?: boolean;
@@ -157,6 +178,7 @@ export declare class CloudSessionController {
157
178
  private assertHandoffConnectionReusable;
158
179
  private createInnerSession;
159
180
  private adoptExistingHandoffSession;
181
+ private resolveComputerUse;
160
182
  private createInnerSessionOnce;
161
183
  private handleEvent;
162
184
  private forwardEvent;
@@ -0,0 +1,53 @@
1
+ import type { NodeHubClient } from "../hub/client";
2
+ import { type CloudSessionRecord } from "./api";
3
+ import type { CloudHubArgs, CloudHubOperation, CloudHubResult, CloudHubScope } from "./hub-protocol";
4
+ import type { CloudSessionEvent, CloudSessionSnapshot, JsonRecord } from "./types";
5
+ export type CloudHubConnection = Pick<NodeHubClient, "command" | "subscribe">;
6
+ /** Transport facade for a hub-owned cloud controller. Disposing only releases this viewer. */
7
+ export declare class HubCloudSessionClient {
8
+ private readonly getConnection;
9
+ private readonly snapshots;
10
+ private readonly records;
11
+ private readonly listeners;
12
+ private unsubscribe?;
13
+ private connection?;
14
+ private disposed;
15
+ private serviceId?;
16
+ private scopeGeneration;
17
+ private revision;
18
+ private readonly sessionRevisions;
19
+ constructor(getConnection: () => Promise<CloudHubConnection>);
20
+ private ready;
21
+ connect(): Promise<void>;
22
+ get scope(): CloudHubScope | undefined;
23
+ private recover;
24
+ private acceptVersion;
25
+ private checkReply;
26
+ private receive;
27
+ subscribe(listener: (event: CloudSessionEvent) => void): () => void;
28
+ protected call<K extends CloudHubOperation>(operation: K, args: CloudHubArgs<K>, expectedScope?: CloudHubScope): Promise<CloudHubResult<K>>;
29
+ create(input: CloudHubArgs<"create">[0], scope?: CloudHubScope): Promise<CloudHubResult<"create">>;
30
+ attach(...args: CloudHubArgs<"attach">): Promise<CloudHubResult<"attach">>;
31
+ send(...args: CloudHubArgs<"send">): Promise<CloudHubResult<"send">>;
32
+ prepareHandoffRepository(repoUrl: string, scope?: CloudHubScope): Promise<CloudHubResult<"prepareHandoffRepository">>;
33
+ refreshOrganization(): Promise<void>;
34
+ abort(...args: CloudHubArgs<"abort">): Promise<CloudHubResult<"abort">>;
35
+ pendingPrompts(...args: CloudHubArgs<"pendingPrompts">): Promise<CloudHubResult<"pendingPrompts">>;
36
+ updatePendingPrompt(...args: CloudHubArgs<"updatePendingPrompt">): Promise<CloudHubResult<"updatePendingPrompt">>;
37
+ removePendingPrompt(...args: CloudHubArgs<"removePendingPrompt">): Promise<CloudHubResult<"removePendingPrompt">>;
38
+ readMessages(...args: CloudHubArgs<"readMessages">): Promise<CloudHubResult<"readMessages">>;
39
+ updateTitle(...args: CloudHubArgs<"updateTitle">): Promise<CloudHubResult<"updateTitle">>;
40
+ delete(...args: CloudHubArgs<"delete">): Promise<CloudHubResult<"delete">>;
41
+ listModels(scope?: CloudHubScope): Promise<CloudHubResult<"listModels">>;
42
+ listRepositories(...args: CloudHubArgs<"listRepositories">): Promise<CloudHubResult<"listRepositories">>;
43
+ listBranches(...args: CloudHubArgs<"listBranches">): Promise<CloudHubResult<"listBranches">>;
44
+ respondApproval(...args: CloudHubArgs<"respondApproval">): Promise<CloudHubResult<"respondApproval">>;
45
+ restoreCreationOptions(...args: CloudHubArgs<"restoreCreationOptions">): Promise<CloudHubResult<"restoreCreationOptions">>;
46
+ getCrossScopeDiscoveryRecord(...args: CloudHubArgs<"getCrossScopeDiscoveryRecord">): Promise<CloudHubResult<"getCrossScopeDiscoveryRecord">>;
47
+ list(): Promise<CloudSessionRecord[]>;
48
+ listForDiscovery(...args: CloudHubArgs<"listForDiscovery">): Promise<JsonRecord[]>;
49
+ getCachedDiscoveryRecord(sessionId: string): JsonRecord | undefined;
50
+ getSnapshot(sessionId: string): CloudSessionSnapshot | undefined;
51
+ isCloudSession(sessionId: string): boolean;
52
+ dispose(): Promise<void>;
53
+ }
@@ -0,0 +1,32 @@
1
+ import type { HandoffGitPublication } from "../services/cloud-handoff/git-preparation";
2
+ import type { CloudSessionController } from "./controller";
3
+ /** Operations available to cloud UI clients. Lifecycle callbacks remain host-local. */
4
+ export declare const CLOUD_HUB_OPERATIONS: readonly ["create", "attach", "send", "abort", "pendingPrompts", "updatePendingPrompt", "removePendingPrompt", "readMessages", "updateTitle", "delete", "list", "listForDiscovery", "getCrossScopeDiscoveryRecord", "listModels", "listRepositories", "listBranches", "respondApproval", "restoreCreationOptions", "refreshOrganization", "prepareHandoffRepository"];
5
+ export type CloudHubScope = {
6
+ serviceId: string;
7
+ scopeGeneration: number;
8
+ expectedAccountId?: string;
9
+ };
10
+ export type CloudHubOperation = (typeof CLOUD_HUB_OPERATIONS)[number];
11
+ export type CloudHubMethods = Pick<CloudSessionController, CloudHubOperation>;
12
+ type CloudCreateInput = Omit<Parameters<CloudSessionController["create"]>[0], "handoff">;
13
+ export type CloudHubCreateInput = CloudCreateInput & ({
14
+ localGit?: never;
15
+ } | {
16
+ localGit: HandoffGitPublication;
17
+ organizationId: string | null;
18
+ requestId: string;
19
+ initialMessage: {
20
+ text: string;
21
+ images?: string[];
22
+ };
23
+ });
24
+ export type CloudHubArgs<K extends CloudHubOperation> = K extends "create" ? [input: CloudHubCreateInput] : K extends "send" ? [
25
+ sessionId: string,
26
+ prompt: string,
27
+ delivery?: "queue" | "steer",
28
+ modelId?: string,
29
+ images?: string[]
30
+ ] : Parameters<CloudHubMethods[K]>;
31
+ export type CloudHubResult<K extends CloudHubOperation> = Awaited<ReturnType<CloudHubMethods[K]>>;
32
+ export {};
@@ -1,7 +1,12 @@
1
1
  /** Experimental cloud execution client. No local runtime or tool execution is initialized. */
2
+ export { createArtifactFetcher } from "../artifacts/cloud/fetch";
3
+ export { createArtifactPublisher } from "../artifacts/cloud/publish";
2
4
  export * from "../services/cloud-handoff";
5
+ export { type HandoffGitPlan, type HandoffGitPreview, inspectHandoffGit, previewHandoffGit, } from "../services/cloud-handoff/git-preparation";
3
6
  export * from "./api";
4
7
  export * from "./controller";
8
+ export * from "./hub-client";
9
+ export * from "./hub-protocol";
5
10
  export * from "./models";
6
11
  export * from "./repositories";
7
12
  export * from "./snapshots";