@cline/core 0.0.85 → 0.0.86-nightly.1790389788
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.
- package/dist/cloud/api.d.ts +118 -0
- package/dist/cloud/controller.d.ts +171 -0
- package/dist/cloud/index.d.ts +9 -0
- package/dist/cloud/index.js +21 -0
- package/dist/cloud/models.d.ts +9 -0
- package/dist/cloud/repositories.d.ts +21 -0
- package/dist/cloud/snapshots.d.ts +22 -0
- package/dist/cloud/state.d.ts +13 -0
- package/dist/cloud/types.d.ts +84 -0
- package/dist/cron/service/schedule-tool.d.ts +3 -3
- package/dist/hub/client/index.d.ts +8 -0
- package/dist/hub/daemon/bind-diagnostics.d.ts +16 -0
- package/dist/hub/daemon/entry.js +196 -195
- package/dist/hub/daemon/index.d.ts +8 -0
- package/dist/hub/discovery/index.d.ts +1 -0
- package/dist/hub/index.js +193 -193
- package/dist/index.d.ts +6 -2
- package/dist/index.js +232 -225
- package/dist/remote/remote-helper-entry.js +4 -4
- package/dist/remote/remote-helper.js +4 -4
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +3 -0
- package/dist/services/cloud-handoff/git-preflight.d.ts +24 -0
- package/dist/services/cloud-handoff/index.d.ts +4 -0
- package/dist/services/cloud-handoff/metadata.d.ts +7 -0
- package/dist/services/cloud-handoff/transcript.d.ts +5 -0
- package/dist/services/cloud-handoff/types.d.ts +35 -0
- package/dist/services/global-settings.d.ts +3 -3
- package/dist/services/llms/provider-settings.d.ts +18 -18
- package/dist/services/plugin-commands.d.ts +28 -0
- package/dist/services/providers/local-provider-registry.d.ts +3 -0
- package/dist/services/providers/local-provider-service.d.ts +6 -3
- package/dist/services/telemetry/core-events.d.ts +9 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/services/workspace/workspace-manifest.d.ts +34 -0
- package/dist/session/fork-metadata.d.ts +7 -0
- package/dist/session/models/session-manifest.d.ts +1 -1
- package/dist/session/services/persistence-service.d.ts +1 -0
- package/dist/tasks/agenda-task-tool.d.ts +2 -2
- package/dist/tasks/task-tool.d.ts +5 -5
- package/dist/types/chat-schema.d.ts +9 -9
- package/package.json +8 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type CloudRepositoryOption = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
fullName: string;
|
|
5
|
+
url: string;
|
|
6
|
+
defaultBranch: string;
|
|
7
|
+
};
|
|
8
|
+
export type CloudRepositoryListResult = {
|
|
9
|
+
connected: boolean;
|
|
10
|
+
connectUrl: string;
|
|
11
|
+
repositories: CloudRepositoryOption[];
|
|
12
|
+
};
|
|
13
|
+
export type CloudBranchListResult = {
|
|
14
|
+
available: boolean;
|
|
15
|
+
branches: string[];
|
|
16
|
+
nextToken?: string;
|
|
17
|
+
};
|
|
18
|
+
export type CloudBranchListOptions = {
|
|
19
|
+
cursor?: string;
|
|
20
|
+
query?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HubEventEnvelope } from "@cline/shared";
|
|
2
|
+
import type { JsonRecord, CloudQueuedPrompt as PromptInQueue } from "./types";
|
|
3
|
+
export declare function readSessionRows(payload: Record<string, unknown> | undefined): JsonRecord[];
|
|
4
|
+
export declare function updatedAt(record: JsonRecord): number;
|
|
5
|
+
export declare function sessionRowModelId(record: JsonRecord | undefined): string;
|
|
6
|
+
export declare function isRootSessionRow(record: JsonRecord): boolean;
|
|
7
|
+
export declare function countPromptOccurrences(messages: unknown[], prompts: PromptInQueue[], prompt: string): number;
|
|
8
|
+
export declare function submittedPromptsFromEvents(events: HubEventEnvelope[]): PromptInQueue[];
|
|
9
|
+
/** Reconciles each completed run separately; tools dedupe by stable call id. */
|
|
10
|
+
export declare function reconcileBufferedCloudEvents(events: HubEventEnvelope[], snapshotMessages: unknown[], options?: {
|
|
11
|
+
/**
|
|
12
|
+
* Whether a fresh queue snapshot was fetched and applied during
|
|
13
|
+
* rehydration. When it was, queue events received before its reply are
|
|
14
|
+
* stale; later events still win. When the fetch failed, the newest
|
|
15
|
+
* buffered queue event is the best state available.
|
|
16
|
+
*/
|
|
17
|
+
queueSnapshotApplied?: boolean;
|
|
18
|
+
queueSnapshotEventCutoff?: number;
|
|
19
|
+
/** Events received after the transcript reply cannot be reflected in it. */
|
|
20
|
+
messagesSnapshotEventCutoff?: number;
|
|
21
|
+
baselineMessages?: unknown[];
|
|
22
|
+
}): HubEventEnvelope[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type HubEventEnvelope } from "@cline/shared";
|
|
2
|
+
import type { CloudSessionState } from "./types";
|
|
3
|
+
export declare function immutableCopy<T>(value: T): T;
|
|
4
|
+
export declare function normalizeSessionTitle(title?: string | null): string | undefined;
|
|
5
|
+
export declare function stringifyMessageContent(value: unknown): string;
|
|
6
|
+
export declare function resolveSessionListTitle(options: {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
metadata?: unknown;
|
|
9
|
+
prompt?: string | null;
|
|
10
|
+
messages?: unknown[];
|
|
11
|
+
}): string;
|
|
12
|
+
/** Mutates only controller-owned state. Hosts receive frozen copies afterwards. */
|
|
13
|
+
export declare function reduceCloudEvent(state: CloudSessionState, event: HubEventEnvelope, streams: Map<string, number>, sessionId: string): void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AgentMode, HubEventEnvelope, MessageWithMetadata } from "@cline/shared";
|
|
2
|
+
import type { CloudSessionRecord, CreateCloudSessionInput } from "./api";
|
|
3
|
+
export type JsonRecord = Record<string, unknown>;
|
|
4
|
+
export type CloudCreationOptions = Pick<CreateCloudSessionInput, "autoApproveTools" | "thinking" | "reasoningEffort">;
|
|
5
|
+
export type CloudHandoffSeed = {
|
|
6
|
+
sourceSessionId: string;
|
|
7
|
+
messages: MessageWithMetadata[];
|
|
8
|
+
mode?: AgentMode;
|
|
9
|
+
workspaceRelativePath?: string;
|
|
10
|
+
config?: CloudCreationOptions;
|
|
11
|
+
/** An earlier dispatch may still complete: only adopt a matching existing seed. */
|
|
12
|
+
recoverOnly?: boolean;
|
|
13
|
+
onSeeding?: () => void | Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
export type CloudQueuedPrompt = {
|
|
16
|
+
id: string;
|
|
17
|
+
prompt: string;
|
|
18
|
+
steer: boolean;
|
|
19
|
+
attachmentCount?: number;
|
|
20
|
+
userImages?: string[];
|
|
21
|
+
};
|
|
22
|
+
export type CloudApproval = {
|
|
23
|
+
requestId: string;
|
|
24
|
+
sessionId: string;
|
|
25
|
+
approvalId: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
toolCallId: string;
|
|
28
|
+
toolName: string;
|
|
29
|
+
input?: unknown;
|
|
30
|
+
iteration?: number;
|
|
31
|
+
agentId?: string;
|
|
32
|
+
conversationId?: string;
|
|
33
|
+
};
|
|
34
|
+
/** Internal mutable state; snapshots returned to hosts are deep copied and frozen. */
|
|
35
|
+
export type CloudSessionState = {
|
|
36
|
+
config: JsonRecord;
|
|
37
|
+
messages: MessageWithMetadata[];
|
|
38
|
+
promptsInQueue: CloudQueuedPrompt[];
|
|
39
|
+
busy: boolean;
|
|
40
|
+
startedAt: number;
|
|
41
|
+
endedAt?: number;
|
|
42
|
+
status: string;
|
|
43
|
+
prompt?: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
attachedViaHub?: boolean;
|
|
46
|
+
lastHubStatusSequence?: number;
|
|
47
|
+
lastQueuedPromptStartId?: string;
|
|
48
|
+
usage?: JsonRecord;
|
|
49
|
+
};
|
|
50
|
+
export type CloudConnectionState = "detached" | "connecting" | "connected" | "reconnecting";
|
|
51
|
+
export type CloudSessionSnapshot = Readonly<CloudSessionState & {
|
|
52
|
+
sessionId: string;
|
|
53
|
+
record?: CloudSessionRecord;
|
|
54
|
+
approvals: CloudApproval[];
|
|
55
|
+
connectionState: CloudConnectionState;
|
|
56
|
+
transcriptKnown: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
export type CloudSessionEvent = {
|
|
59
|
+
type: "prompt_accepted";
|
|
60
|
+
sessionId: string;
|
|
61
|
+
prompt: string;
|
|
62
|
+
delivery?: "queue" | "steer";
|
|
63
|
+
} | {
|
|
64
|
+
type: "snapshot";
|
|
65
|
+
sessionId: string;
|
|
66
|
+
snapshot: CloudSessionSnapshot;
|
|
67
|
+
replace: boolean;
|
|
68
|
+
cause?: "status" | "ended" | "queue" | "approvals";
|
|
69
|
+
} | {
|
|
70
|
+
type: "hub_event";
|
|
71
|
+
sessionId: string;
|
|
72
|
+
event: HubEventEnvelope;
|
|
73
|
+
} | {
|
|
74
|
+
type: "sync_failed";
|
|
75
|
+
sessionId: string;
|
|
76
|
+
message: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: "removed";
|
|
79
|
+
sessionId: string;
|
|
80
|
+
};
|
|
81
|
+
export type CloudSessionAttachment = JsonRecord & {
|
|
82
|
+
sessionId: string;
|
|
83
|
+
status: string;
|
|
84
|
+
};
|
|
@@ -6,10 +6,10 @@ export declare const ScheduledTaskInputSchema: z.ZodObject<{
|
|
|
6
6
|
update: "update";
|
|
7
7
|
create: "create";
|
|
8
8
|
list: "list";
|
|
9
|
-
get: "get";
|
|
10
|
-
delete: "delete";
|
|
11
9
|
pause: "pause";
|
|
12
10
|
resume: "resume";
|
|
11
|
+
get: "get";
|
|
12
|
+
delete: "delete";
|
|
13
13
|
run_now: "run_now";
|
|
14
14
|
}>;
|
|
15
15
|
schedule_id: z.ZodOptional<z.ZodString>;
|
|
@@ -24,8 +24,8 @@ export declare const ScheduledTaskInputSchema: z.ZodObject<{
|
|
|
24
24
|
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
25
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
26
26
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
27
|
-
act: "act";
|
|
28
27
|
plan: "plan";
|
|
28
|
+
act: "act";
|
|
29
29
|
yolo: "yolo";
|
|
30
30
|
}>>;
|
|
31
31
|
system_prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4,6 +4,9 @@ type HubCommandOptions = {
|
|
|
4
4
|
timeoutMs?: number | null;
|
|
5
5
|
/** Synchronous local guard, checked after connection before each dispatch. */
|
|
6
6
|
beforeDispatch?: () => void;
|
|
7
|
+
/** Observes this attempt's correlation id after the local guard, before sending.
|
|
8
|
+
* Dispatch alone does not confirm that the server accepted the command. */
|
|
9
|
+
onDispatch?: (requestId: string) => void;
|
|
7
10
|
};
|
|
8
11
|
export interface HubClientOptions {
|
|
9
12
|
url: string;
|
|
@@ -28,6 +31,11 @@ export interface LocalHubResolutionOptions {
|
|
|
28
31
|
strategy?: "prefer-hub" | "require-hub";
|
|
29
32
|
workspaceRoot?: string;
|
|
30
33
|
cwd?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Called with the error when starting a detached Hub fails. The function
|
|
36
|
+
* still resolves `undefined` in that case; this lets a caller report why.
|
|
37
|
+
*/
|
|
38
|
+
onStartupError?: (error: unknown) => void;
|
|
31
39
|
}
|
|
32
40
|
export type HubTransportErrorCode = "hub_connect_timeout" | "hub_connect_failed" | "hub_connection_closed" | "hub_connection_not_open";
|
|
33
41
|
export declare class HubTransportError extends Error {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort description of who holds the Hub port when the daemon dies with
|
|
3
|
+
* `EADDRINUSE`. The daemon takes the owner instance lock before binding, so an
|
|
4
|
+
* occupant on the port is never a live Hub for this owner; these details tell
|
|
5
|
+
* us what it actually is (an older pre-lock Hub, a leaked handle, another
|
|
6
|
+
* owner context, or an unrelated program) so the fix can target that case.
|
|
7
|
+
*/
|
|
8
|
+
import type { TelemetryProperties } from "@cline/shared";
|
|
9
|
+
/** `lsof -Fpc` emits `p<pid>` then `c<command>` per process. */
|
|
10
|
+
export declare function parseLsofOwners(output: string): string[];
|
|
11
|
+
/** Telemetry context for a `hub.daemon.startup` failure caused by `EADDRINUSE`. */
|
|
12
|
+
export declare function describeAddressInUse(error: unknown, endpoint: {
|
|
13
|
+
host: string;
|
|
14
|
+
port: number;
|
|
15
|
+
pathname: string;
|
|
16
|
+
}): Promise<TelemetryProperties>;
|