@cline/core 0.0.95 → 0.2.0

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 (167) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/cline-core/runtime-services.d.ts +4 -2
  4. package/dist/cloud/controller.d.ts +5 -2
  5. package/dist/cloud/hub-client.d.ts +51 -0
  6. package/dist/cloud/hub-protocol.d.ts +18 -0
  7. package/dist/cloud/index.d.ts +2 -0
  8. package/dist/cloud/index.js +16 -16
  9. package/dist/cloud/types.d.ts +4 -1
  10. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  11. package/dist/extensions/context/compaction.d.ts +7 -0
  12. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  13. package/dist/extensions/context/summary-generation.d.ts +14 -0
  14. package/dist/extensions/mcp/apps.d.ts +16 -0
  15. package/dist/extensions/mcp/client.d.ts +1 -0
  16. package/dist/extensions/mcp/index.d.ts +5 -1
  17. package/dist/extensions/mcp/manager.d.ts +2 -1
  18. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  19. package/dist/extensions/mcp/types.d.ts +22 -0
  20. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  21. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  22. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  23. package/dist/hub/client/index.d.ts +6 -0
  24. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  25. package/dist/hub/client/plugin-commands.d.ts +4 -0
  26. package/dist/hub/client/session-client.d.ts +2 -0
  27. package/dist/hub/daemon/entry.js +241 -228
  28. package/dist/hub/index.d.ts +1 -0
  29. package/dist/hub/index.js +231 -218
  30. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  31. package/dist/hub/server/cloud-session-service.d.ts +50 -0
  32. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  33. package/dist/hub/server/handlers/context.d.ts +13 -2
  34. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  35. package/dist/hub/server/hub-server-options.d.ts +3 -0
  36. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  37. package/dist/index.d.ts +8 -4
  38. package/dist/index.js +278 -258
  39. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  40. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  41. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-b1d8eb67.js +1 -0
  42. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-33qvrctr.js +1 -0
  43. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-paabhz8w.js +1 -0
  44. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-yhsfqcy1.js +1 -0
  45. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +21 -0
  46. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-gqgs7446.js +1 -0
  47. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-822304b0.js +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-hky2m2yx.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-sqf1kd37.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-tx1kp6xn.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-6cpgjxme.js +2 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-fxchqbze.js +2 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-m3bzwmzc.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-pr9sb5fr.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-nckraycx.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-w91yq3tm.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-xdyxc2tf.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-yxsvs11a.js +1 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-pgdk2dm9.js +1 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1160 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1147 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-02jpyn9y.js +85 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0cb4390m.js +137 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0f8xrhgt.js +209 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1f8vb421.js +2 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-28c7m0fv.js +16 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-2em3jg4q.js +1 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4n1zpzbe.js +2 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-54eea0ex.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5j92dtg5.js +16 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6akf3a5d.js +2 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6k6ep10s.js +136 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-71ym4q6s.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-91p1ghfk.js +14 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9qkpjy7x.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9swk4nej.js +3 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-aa2s5myc.js +1 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ae0ajw38.js +13 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bxvyzjhc.js +1 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bzy863k0.js +6 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d96n0s70.js +20 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-dsd6vt8c.js +1 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-e2q4azd9.js +119 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-egd18jj2.js +4 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-eh83hr16.js +2 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ev9r2dy3.js +1204 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f2mvvryf.js +190 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7gn5v3f.js +2 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7s1a560.js +12 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkhq3jtz.js +21 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-j8r18nfg.js +15 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-jhny555h.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m1gpa2eg.js +146 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m2ad6tgj.js +1 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m7mks2jq.js +4 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-mcnngj50.js +62 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-n2srkkh0.js +39 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nbs1tsny.js +142 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nqjnz7m4.js +9 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rmhzyxr8.js +3 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rtzf3vvk.js +6 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sw74pcm3.js +2 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t3eanyjj.js +3 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-tseksj1v.js +1 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v0ctpcdr.js +12 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-dx8bd4wq.js +1 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v695918t.js +14 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v96yy1pw.js +1 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vfm7r9wk.js +65 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xecthgrg.js +9 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xn1xhp06.js +9 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yfdscfdx.js +1 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yrnwqsdt.js +2 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-3mgy2y9y.js +473 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-w1xrs0vd.js +1 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-9tppg77c.js +1 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-y658kpzy.js +1 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-cmhqd91b.js +1 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-qkjjf8mm.js +2 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-8z6y9d1h.js +1 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-cfmja1ez.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-1t7n5sxj.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-k6yqgnyd.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-6rdyebbq.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-1h068py9.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-7jchft51.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-qfxfsrn4.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  133. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  138. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  139. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  140. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  146. package/dist/plugin-runtime/package.json +1 -0
  147. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  148. package/dist/remote/remote-environments.d.ts +1 -0
  149. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  150. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  151. package/dist/runtime/host/runtime-host.d.ts +6 -0
  152. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  153. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  154. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  155. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  156. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  157. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  158. package/dist/services/plugin-command-api.d.ts +47 -0
  159. package/dist/services/plugin-commands.d.ts +25 -27
  160. package/dist/services/skills-cli.d.ts +2 -0
  161. package/dist/services/telemetry/core-events.d.ts +26 -0
  162. package/dist/services/telemetry/index.js +1 -1
  163. package/dist/services/telemetry/run-health.d.ts +40 -0
  164. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  165. package/dist/types/config.d.ts +1 -0
  166. package/dist/types/session.d.ts +7 -0
  167. 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
  }
@@ -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;
@@ -3,7 +3,7 @@ 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
7
  export declare const CLOUD_SESSION_SYSTEM_PROMPT: string;
8
8
  /** The prompt a new cloud task starts with: GitHub access plus its work-branch rules. */
9
9
  export declare function buildCloudSessionSystemPrompt(record: Pick<CloudSessionRecord, "id" | "sandboxType" | "metadata">): string;
@@ -58,6 +58,7 @@ export declare class CloudSessionController {
58
58
  private readonly unlistedSessions;
59
59
  private readonly pendingInitialTasks;
60
60
  private lastListedSessions;
61
+ private lastListedOrganizationId?;
61
62
  private discoveryRefresh?;
62
63
  private readonly unconfirmedInnerCreates;
63
64
  private readonly createRequests;
@@ -90,8 +91,10 @@ export declare class CloudSessionController {
90
91
  /** Revalidates a cached row by id when the active-scope list does not include it. */
91
92
  getCrossScopeDiscoveryRecord(sessionId: string): Promise<JsonRecord | undefined>;
92
93
  list(): Promise<CloudSessionRecord[]>;
94
+ private listInOrganization;
93
95
  handoffTargetExists(sessionId: string): Promise<boolean>;
94
96
  private preserveConnectedRuntimeModel;
97
+ refreshOrganization(): Promise<void>;
95
98
  private resolveActiveOrganizationId;
96
99
  listRepositories(): Promise<CloudRepositoryListResult>;
97
100
  listModels(): Promise<CloudModel[]>;
@@ -118,7 +121,7 @@ export declare class CloudSessionController {
118
121
  private createOnce;
119
122
  private deleteProvisionedSessionAfterDispose;
120
123
  attach(outerSessionId: string, creationOptions?: CloudCreationOptions): Promise<CloudSessionAttachment>;
121
- send(outerSessionId: string, prompt: string, requestedDelivery?: "queue" | "steer", modelId?: string, userImages?: string[]): Promise<{
124
+ send(outerSessionId: string, prompt: string, requestedDelivery?: "queue" | "steer", modelId?: string, userImages?: string[], lifecycle?: CloudSendLifecycle): Promise<{
122
125
  sessionId: string;
123
126
  ok: true;
124
127
  queued?: boolean;
@@ -0,0 +1,51 @@
1
+ import type { NodeHubClient } from "../hub/client";
2
+ import type { CloudSessionRecord } from "./api";
3
+ import type { CloudHubArgs, CloudHubOperation, CloudHubResult } 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
+ private recover;
23
+ private acceptVersion;
24
+ private checkReply;
25
+ private receive;
26
+ subscribe(listener: (event: CloudSessionEvent) => void): () => void;
27
+ protected call<K extends CloudHubOperation>(operation: K, args: CloudHubArgs<K>): Promise<CloudHubResult<K>>;
28
+ create(...args: CloudHubArgs<"create">): Promise<CloudHubResult<"create">>;
29
+ attach(...args: CloudHubArgs<"attach">): Promise<CloudHubResult<"attach">>;
30
+ send(...args: CloudHubArgs<"send">): Promise<CloudHubResult<"send">>;
31
+ refreshOrganization(): Promise<void>;
32
+ abort(...args: CloudHubArgs<"abort">): Promise<CloudHubResult<"abort">>;
33
+ pendingPrompts(...args: CloudHubArgs<"pendingPrompts">): Promise<CloudHubResult<"pendingPrompts">>;
34
+ updatePendingPrompt(...args: CloudHubArgs<"updatePendingPrompt">): Promise<CloudHubResult<"updatePendingPrompt">>;
35
+ removePendingPrompt(...args: CloudHubArgs<"removePendingPrompt">): Promise<CloudHubResult<"removePendingPrompt">>;
36
+ readMessages(...args: CloudHubArgs<"readMessages">): Promise<CloudHubResult<"readMessages">>;
37
+ updateTitle(...args: CloudHubArgs<"updateTitle">): Promise<CloudHubResult<"updateTitle">>;
38
+ delete(...args: CloudHubArgs<"delete">): Promise<CloudHubResult<"delete">>;
39
+ listModels(...args: CloudHubArgs<"listModels">): Promise<CloudHubResult<"listModels">>;
40
+ listRepositories(...args: CloudHubArgs<"listRepositories">): Promise<CloudHubResult<"listRepositories">>;
41
+ listBranches(...args: CloudHubArgs<"listBranches">): Promise<CloudHubResult<"listBranches">>;
42
+ respondApproval(...args: CloudHubArgs<"respondApproval">): Promise<CloudHubResult<"respondApproval">>;
43
+ restoreCreationOptions(...args: CloudHubArgs<"restoreCreationOptions">): Promise<CloudHubResult<"restoreCreationOptions">>;
44
+ getCrossScopeDiscoveryRecord(...args: CloudHubArgs<"getCrossScopeDiscoveryRecord">): Promise<CloudHubResult<"getCrossScopeDiscoveryRecord">>;
45
+ list(): Promise<CloudSessionRecord[]>;
46
+ listForDiscovery(...args: CloudHubArgs<"listForDiscovery">): Promise<JsonRecord[]>;
47
+ getCachedDiscoveryRecord(sessionId: string): JsonRecord | undefined;
48
+ getSnapshot(sessionId: string): CloudSessionSnapshot | undefined;
49
+ isCloudSession(sessionId: string): boolean;
50
+ dispose(): Promise<void>;
51
+ }
@@ -0,0 +1,18 @@
1
+ import type { CreateCloudSessionInput } from "./api";
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"];
5
+ export type CloudHubScope = {
6
+ serviceId: string;
7
+ scopeGeneration: number;
8
+ };
9
+ export type CloudHubOperation = (typeof CLOUD_HUB_OPERATIONS)[number];
10
+ export type CloudHubMethods = Pick<CloudSessionController, CloudHubOperation>;
11
+ export type CloudHubArgs<K extends CloudHubOperation> = K extends "create" ? [input: Omit<CreateCloudSessionInput, "handoff">] : K extends "send" ? [
12
+ sessionId: string,
13
+ prompt: string,
14
+ delivery?: "queue" | "steer",
15
+ modelId?: string,
16
+ images?: string[]
17
+ ] : Parameters<CloudHubMethods[K]>;
18
+ export type CloudHubResult<K extends CloudHubOperation> = Awaited<ReturnType<CloudHubMethods[K]>>;
@@ -2,6 +2,8 @@
2
2
  export * from "../services/cloud-handoff";
3
3
  export * from "./api";
4
4
  export * from "./controller";
5
+ export * from "./hub-client";
6
+ export * from "./hub-protocol";
5
7
  export * from "./models";
6
8
  export * from "./repositories";
7
9
  export * from "./snapshots";