@sctg/cline-shared 3.84.0-beta.20260524130712
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/README.md +47 -0
- package/dist/agent.d.ts +388 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/types.d.ts +967 -0
- package/dist/automation/index.d.ts +3 -0
- package/dist/automation/index.js +65 -0
- package/dist/automation/schemas.d.ts +89 -0
- package/dist/automation/types.d.ts +151 -0
- package/dist/connectors/events.d.ts +93 -0
- package/dist/connectors/options.d.ts +174 -0
- package/dist/cron/cron-spec-types.d.ts +94 -0
- package/dist/cron/index.d.ts +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.js +80 -0
- package/dist/db/sqlite-db.d.ts +24 -0
- package/dist/dispose.d.ts +13 -0
- package/dist/extensions/context.d.ts +76 -0
- package/dist/extensions/contribution-registry.d.ts +195 -0
- package/dist/extensions/plugin.d.ts +1 -0
- package/dist/hooks/contracts.d.ts +9 -0
- package/dist/hooks/events.d.ts +194 -0
- package/dist/hub.d.ts +470 -0
- package/dist/index.browser.d.ts +61 -0
- package/dist/index.browser.js +76 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +163 -0
- package/dist/llms/ai-sdk-format.d.ts +55 -0
- package/dist/llms/gateway.d.ts +145 -0
- package/dist/llms/messages.d.ts +149 -0
- package/dist/llms/model-info.d.ts +120 -0
- package/dist/llms/reasoning-effort.d.ts +21 -0
- package/dist/llms/requests.d.ts +2 -0
- package/dist/llms/tokens.d.ts +7 -0
- package/dist/llms/tools.d.ts +86 -0
- package/dist/logging/logger.d.ts +37 -0
- package/dist/parse/error.d.ts +2 -0
- package/dist/parse/headers/utils.d.ts +1 -0
- package/dist/parse/json.d.ts +3 -0
- package/dist/parse/shell.d.ts +2 -0
- package/dist/parse/string.d.ts +4 -0
- package/dist/parse/time.d.ts +9 -0
- package/dist/parse/zod.d.ts +12 -0
- package/dist/prompt/cline.d.ts +24 -0
- package/dist/prompt/format.d.ts +11 -0
- package/dist/prompt/system.d.ts +2 -0
- package/dist/remote-config/artifact-store.d.ts +13 -0
- package/dist/remote-config/blob-storage.d.ts +47 -0
- package/dist/remote-config/bundle.d.ts +136 -0
- package/dist/remote-config/constants.d.ts +5 -0
- package/dist/remote-config/index.d.ts +9 -0
- package/dist/remote-config/index.js +76 -0
- package/dist/remote-config/materializer.d.ts +4 -0
- package/dist/remote-config/paths.d.ts +10 -0
- package/dist/remote-config/runtime.d.ts +20 -0
- package/dist/remote-config/schema.d.ts +408 -0
- package/dist/remote-config/telemetry.d.ts +9 -0
- package/dist/rpc/index.d.ts +5 -0
- package/dist/rpc/runtime.d.ts +322 -0
- package/dist/rpc/team-progress.d.ts +53 -0
- package/dist/runtime/build-env.d.ts +13 -0
- package/dist/runtime/cline-environment.d.ts +17 -0
- package/dist/runtime/hub-daemon-env.d.ts +2 -0
- package/dist/services/telemetry-config.d.ts +6 -0
- package/dist/services/telemetry.d.ts +133 -0
- package/dist/session/hook-context.d.ts +12 -0
- package/dist/session/index.d.ts +1 -0
- package/dist/session/records.d.ts +31 -0
- package/dist/session/runtime-config.d.ts +26 -0
- package/dist/session/runtime-env.d.ts +8 -0
- package/dist/session/workspace.d.ts +28 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.js +1 -0
- package/dist/storage/path-resolution.d.ts +11 -0
- package/dist/storage/paths.d.ts +86 -0
- package/dist/team/index.d.ts +2 -0
- package/dist/team/schema.d.ts +411 -0
- package/dist/team/types.d.ts +196 -0
- package/dist/tools/create.d.ts +22 -0
- package/dist/types/auth.d.ts +20 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/vcr.d.ts +14 -0
- package/dist/vcr.d.ts +41 -0
- package/package.json +63 -0
package/dist/hub.d.ts
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import type { AgentMessage } from "./agent";
|
|
2
|
+
import type { ReasoningEffort } from "./agents/types";
|
|
3
|
+
import type { GatewayModelSelection, JsonValue } from "./llms/gateway";
|
|
4
|
+
import type { RuntimeConfigExtensionKind } from "./session/runtime-config";
|
|
5
|
+
export type HubProtocolVersion = "v1";
|
|
6
|
+
export type HubActorKind = "client" | "peerHub";
|
|
7
|
+
export type HubTransportKind = "native" | "browser" | "remote" | "native-grpc" | "browser-ws" | "browser-grpc-web" | "peer-grpc";
|
|
8
|
+
export type HubRuntimeStatus = "idle" | "running" | "pending" | "completed" | "aborted" | "failed";
|
|
9
|
+
export type HubSpokeStatus = "starting" | "ready" | "busy" | "stopping" | "stopped" | "failed";
|
|
10
|
+
export interface ClientCapability {
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
scopes?: string[];
|
|
14
|
+
payloadSchema?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface HubClientRegistration {
|
|
17
|
+
clientId?: string;
|
|
18
|
+
clientType: string;
|
|
19
|
+
displayName?: string;
|
|
20
|
+
actorKind?: HubActorKind;
|
|
21
|
+
transport: HubTransportKind;
|
|
22
|
+
capabilities?: ClientCapability[];
|
|
23
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
24
|
+
workspaceContext?: {
|
|
25
|
+
workspaceRoot?: string;
|
|
26
|
+
cwd?: string;
|
|
27
|
+
};
|
|
28
|
+
protocolVersion?: HubProtocolVersion;
|
|
29
|
+
}
|
|
30
|
+
export interface HubClientRecord {
|
|
31
|
+
clientId: string;
|
|
32
|
+
clientType: string;
|
|
33
|
+
displayName?: string;
|
|
34
|
+
actorKind: HubActorKind;
|
|
35
|
+
connectedAt: number;
|
|
36
|
+
lastSeenAt: number;
|
|
37
|
+
transport: HubTransportKind;
|
|
38
|
+
capabilities: ClientCapability[];
|
|
39
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
40
|
+
workspaceContext?: {
|
|
41
|
+
workspaceRoot?: string;
|
|
42
|
+
cwd?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface SessionParticipant {
|
|
46
|
+
clientId: string;
|
|
47
|
+
attachedAt: number;
|
|
48
|
+
role?: "creator" | "participant" | "observer";
|
|
49
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
50
|
+
}
|
|
51
|
+
export interface SessionMetrics {
|
|
52
|
+
inputTokens?: number;
|
|
53
|
+
outputTokens?: number;
|
|
54
|
+
cacheReadTokens?: number;
|
|
55
|
+
cacheWriteTokens?: number;
|
|
56
|
+
totalCost?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface HubTeamMembership {
|
|
59
|
+
teamId: string;
|
|
60
|
+
role?: "lead" | "teammate" | "contractor";
|
|
61
|
+
}
|
|
62
|
+
export interface HubSessionRuntimeSnapshot {
|
|
63
|
+
runId?: string;
|
|
64
|
+
status?: HubRuntimeStatus;
|
|
65
|
+
iteration?: number;
|
|
66
|
+
messages?: AgentMessage[];
|
|
67
|
+
pendingToolCalls?: unknown[];
|
|
68
|
+
usage?: SessionMetrics;
|
|
69
|
+
aggregateUsage?: SessionMetrics;
|
|
70
|
+
lastError?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface SessionRecord {
|
|
73
|
+
sessionId: string;
|
|
74
|
+
workspaceRoot: string;
|
|
75
|
+
cwd?: string;
|
|
76
|
+
createdAt: number;
|
|
77
|
+
updatedAt: number;
|
|
78
|
+
createdByClientId: string;
|
|
79
|
+
assignedSpokeId?: string;
|
|
80
|
+
status: HubRuntimeStatus;
|
|
81
|
+
/**
|
|
82
|
+
* Clients currently observing or attached to this session. Participants do not
|
|
83
|
+
* own client-local capabilities; capability routing is owned by the client that
|
|
84
|
+
* created/restored the runtime session and advertised those capabilities.
|
|
85
|
+
*/
|
|
86
|
+
participants: SessionParticipant[];
|
|
87
|
+
activeRunId?: string;
|
|
88
|
+
runtimeOptions?: HubSessionRuntimeOptions;
|
|
89
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
90
|
+
runtimeSession?: {
|
|
91
|
+
agentId: string;
|
|
92
|
+
agentRole?: string;
|
|
93
|
+
team?: HubTeamMembership;
|
|
94
|
+
};
|
|
95
|
+
usage?: SessionMetrics;
|
|
96
|
+
aggregateUsage?: SessionMetrics;
|
|
97
|
+
}
|
|
98
|
+
export interface HubSessionSnapshot {
|
|
99
|
+
sessionId: string;
|
|
100
|
+
agentId: string;
|
|
101
|
+
agentRole?: string;
|
|
102
|
+
workspacePath: string;
|
|
103
|
+
rootPath?: string;
|
|
104
|
+
createdAt: number;
|
|
105
|
+
updatedAt: number;
|
|
106
|
+
messages: AgentMessage[];
|
|
107
|
+
runCount: number;
|
|
108
|
+
lastRunId?: string;
|
|
109
|
+
status: HubRuntimeStatus;
|
|
110
|
+
metadata?: Record<string, unknown>;
|
|
111
|
+
team?: HubTeamMembership;
|
|
112
|
+
runtime?: HubSessionRuntimeSnapshot;
|
|
113
|
+
}
|
|
114
|
+
export interface SpokeRecord {
|
|
115
|
+
spokeId: string;
|
|
116
|
+
kind: "subprocess";
|
|
117
|
+
status: HubSpokeStatus;
|
|
118
|
+
workspaceRoots: string[];
|
|
119
|
+
sessionIds: string[];
|
|
120
|
+
startedAt: number;
|
|
121
|
+
lastSeenAt: number;
|
|
122
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
123
|
+
}
|
|
124
|
+
export type ApprovalStatus = "pending" | "approved" | "rejected" | "cancelled";
|
|
125
|
+
export interface ApprovalRequestRecord {
|
|
126
|
+
approvalId: string;
|
|
127
|
+
sessionId: string;
|
|
128
|
+
requestedByClientId: string;
|
|
129
|
+
targetClientId?: string;
|
|
130
|
+
status: ApprovalStatus;
|
|
131
|
+
requestedAt: number;
|
|
132
|
+
resolvedAt?: number;
|
|
133
|
+
payload: Record<string, JsonValue | undefined>;
|
|
134
|
+
response?: {
|
|
135
|
+
approved: boolean;
|
|
136
|
+
respondedByClientId: string;
|
|
137
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export type CapabilityRequestStatus = "pending" | "resolved" | "rejected" | "cancelled";
|
|
141
|
+
export interface CapabilityRequestRecord {
|
|
142
|
+
requestId: string;
|
|
143
|
+
sessionId: string;
|
|
144
|
+
requestedByClientId: string;
|
|
145
|
+
targetClientId?: string;
|
|
146
|
+
capabilityName: string;
|
|
147
|
+
status: CapabilityRequestStatus;
|
|
148
|
+
requestedAt: number;
|
|
149
|
+
resolvedAt?: number;
|
|
150
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
151
|
+
response?: {
|
|
152
|
+
ok: boolean;
|
|
153
|
+
respondedByClientId: string;
|
|
154
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
155
|
+
error?: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface PeerHubRecord {
|
|
159
|
+
peerHubId: string;
|
|
160
|
+
status: "connecting" | "ready" | "disconnected" | "failed";
|
|
161
|
+
connectedAt: number;
|
|
162
|
+
lastSeenAt: number;
|
|
163
|
+
transport: Extract<HubTransportKind, "peer-grpc" | "remote" | "native">;
|
|
164
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
165
|
+
}
|
|
166
|
+
export interface ScheduleRecord {
|
|
167
|
+
scheduleId: string;
|
|
168
|
+
name: string;
|
|
169
|
+
cronPattern: string;
|
|
170
|
+
prompt: string;
|
|
171
|
+
workspaceRoot: string;
|
|
172
|
+
cwd?: string;
|
|
173
|
+
modelSelection?: GatewayModelSelection;
|
|
174
|
+
enabled: boolean;
|
|
175
|
+
mode?: "act" | "plan" | "yolo";
|
|
176
|
+
systemPrompt?: string;
|
|
177
|
+
maxIterations?: number;
|
|
178
|
+
timeoutSeconds?: number;
|
|
179
|
+
maxParallel?: number;
|
|
180
|
+
createdAt: number;
|
|
181
|
+
updatedAt: number;
|
|
182
|
+
nextRunAt?: number;
|
|
183
|
+
lastRunAt?: number;
|
|
184
|
+
createdBy?: string;
|
|
185
|
+
tags?: string[];
|
|
186
|
+
runtimeOptions?: HubSessionRuntimeOptions;
|
|
187
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
188
|
+
}
|
|
189
|
+
export type ScheduleExecutionStatus = "pending" | "running" | "success" | "completed" | "failed" | "timeout" | "aborted";
|
|
190
|
+
export interface ScheduleExecutionRecord {
|
|
191
|
+
executionId: string;
|
|
192
|
+
scheduleId: string;
|
|
193
|
+
sessionId?: string;
|
|
194
|
+
triggeredAt: number;
|
|
195
|
+
startedAt?: number;
|
|
196
|
+
endedAt?: number;
|
|
197
|
+
status: ScheduleExecutionStatus;
|
|
198
|
+
exitCode?: number;
|
|
199
|
+
errorMessage?: string;
|
|
200
|
+
iterations?: number;
|
|
201
|
+
tokensUsed?: number;
|
|
202
|
+
costUsd?: number;
|
|
203
|
+
}
|
|
204
|
+
export interface HubScheduleCreateInput {
|
|
205
|
+
name: string;
|
|
206
|
+
cronPattern: string;
|
|
207
|
+
prompt: string;
|
|
208
|
+
workspaceRoot: string;
|
|
209
|
+
cwd?: string;
|
|
210
|
+
modelSelection?: GatewayModelSelection;
|
|
211
|
+
enabled?: boolean;
|
|
212
|
+
mode?: "act" | "plan" | "yolo";
|
|
213
|
+
systemPrompt?: string;
|
|
214
|
+
maxIterations?: number;
|
|
215
|
+
timeoutSeconds?: number;
|
|
216
|
+
maxParallel?: number;
|
|
217
|
+
createdBy?: string;
|
|
218
|
+
tags?: string[];
|
|
219
|
+
runtimeOptions?: HubSessionRuntimeOptions;
|
|
220
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
221
|
+
}
|
|
222
|
+
export interface HubScheduleUpdateInput {
|
|
223
|
+
scheduleId: string;
|
|
224
|
+
name?: string;
|
|
225
|
+
cronPattern?: string;
|
|
226
|
+
prompt?: string;
|
|
227
|
+
workspaceRoot?: string;
|
|
228
|
+
cwd?: string;
|
|
229
|
+
modelSelection?: GatewayModelSelection;
|
|
230
|
+
enabled?: boolean;
|
|
231
|
+
mode?: "act" | "plan" | "yolo";
|
|
232
|
+
systemPrompt?: string | null;
|
|
233
|
+
maxIterations?: number | null;
|
|
234
|
+
timeoutSeconds?: number | null;
|
|
235
|
+
maxParallel?: number;
|
|
236
|
+
createdBy?: string | null;
|
|
237
|
+
tags?: string[];
|
|
238
|
+
runtimeOptions?: HubSessionRuntimeOptions;
|
|
239
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
240
|
+
}
|
|
241
|
+
export type HubCommandName = "client.register" | "client.update" | "client.unregister" | "client.list" | "cline.account.get_current" | "prompt_commands.list" | "prompt_commands.execute" | "mention_files.search" | "catalog.list" | "session.list" | "session.create" | "session.attach" | "session.detach" | "session.get" | "session.messages" | "session.restore" | "session.delete" | "session.update" | "session.pending_prompts" | "session.update_pending_prompt" | "session.remove_pending_prompt" | "session.fork" | "session.hook" | "run.start" | "session.send_input" | "run.abort" | "approval.request" | "approval.respond" | "capability.request" | "capability.progress" | "capability.respond" | "peer.register" | "peer.list_sessions" | "peer.attach_session" | "peer.detach_session" | "peer.proxy_command" | "schedule.create" | "schedule.list" | "schedule.get" | "schedule.update" | "schedule.delete" | "schedule.enable" | "schedule.disable" | "schedule.trigger" | "schedule.list_executions" | "schedule.stats" | "schedule.active" | "schedule.upcoming" | "settings.list" | "settings.get" | "settings.patch" | "settings.toggle" | "cron.event.ingest" | "cron.event.list" | "cron.event.get" | "ui.notify" | "ui.show_window";
|
|
242
|
+
export declare const HUB_DEFAULT_COMMAND_TIMEOUT_MS = 30000;
|
|
243
|
+
export declare const HUB_COMMAND_SLOW_LOG_MS = 5000;
|
|
244
|
+
export declare function getDefaultHubCommandTimeoutMs(command: HubCommandName): number | null;
|
|
245
|
+
export declare function resolveHubCommandTimeoutMs(command: HubCommandName, timeoutMs?: number | null): number | null;
|
|
246
|
+
export interface HubCommandEnvelope {
|
|
247
|
+
version: HubProtocolVersion;
|
|
248
|
+
command: HubCommandName;
|
|
249
|
+
requestId?: string;
|
|
250
|
+
clientId?: string;
|
|
251
|
+
sessionId?: string;
|
|
252
|
+
timeoutMs?: number | null;
|
|
253
|
+
payload?: Record<string, unknown>;
|
|
254
|
+
}
|
|
255
|
+
export interface HubReplyEnvelope {
|
|
256
|
+
version: HubProtocolVersion;
|
|
257
|
+
requestId?: string;
|
|
258
|
+
ok: boolean;
|
|
259
|
+
payload?: Record<string, unknown>;
|
|
260
|
+
error?: {
|
|
261
|
+
code: string;
|
|
262
|
+
message: string;
|
|
263
|
+
details?: Record<string, unknown>;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
export type HubEventName = "hub.client.registered" | "hub.client.disconnected" | "session.created" | "session.updated" | "session.attached" | "session.detached" | "session.forked" | "session.pending_prompts" | "session.pending_prompt_submitted" | "run.started" | "run.heartbeat" | "run.aborted" | "run.completed" | "run.failed" | "iteration.started" | "iteration.finished" | "assistant.delta" | "assistant.finished" | "reasoning.delta" | "reasoning.finished" | "agent.done" | "usage.updated" | "tool.started" | "tool.updated" | "tool.finished" | "approval.requested" | "approval.resolved" | "capability.requested" | "capability.resolved" | "team.progress" | "artifact.created" | "diff.created" | "spoke.started" | "spoke.failed" | "spoke.stopped" | "peer.registered" | "peer.session_attached" | "peer.session_detached" | "schedule.created" | "schedule.updated" | "schedule.deleted" | "schedule.triggered" | "schedule.execution_completed" | "schedule.execution_failed" | "settings.changed" | "ui.notify" | "ui.show_window" | "hub.client.updated";
|
|
267
|
+
export interface HubEventEnvelope {
|
|
268
|
+
version: HubProtocolVersion;
|
|
269
|
+
event: HubEventName;
|
|
270
|
+
eventId?: string;
|
|
271
|
+
sessionId?: string;
|
|
272
|
+
clientId?: string;
|
|
273
|
+
sourceHubId?: string;
|
|
274
|
+
timestamp?: number;
|
|
275
|
+
payload?: Record<string, unknown>;
|
|
276
|
+
}
|
|
277
|
+
export interface HubCapabilityRequestedPayload {
|
|
278
|
+
requestId: string;
|
|
279
|
+
targetClientId: string;
|
|
280
|
+
capabilityName: string;
|
|
281
|
+
payload?: Record<string, unknown>;
|
|
282
|
+
}
|
|
283
|
+
export interface HubCapabilityResolvedPayload {
|
|
284
|
+
requestId: string;
|
|
285
|
+
targetClientId: string;
|
|
286
|
+
respondedByClientId?: string;
|
|
287
|
+
capabilityName: string;
|
|
288
|
+
ok: boolean;
|
|
289
|
+
cancelled?: boolean;
|
|
290
|
+
payload?: Record<string, unknown>;
|
|
291
|
+
error?: string;
|
|
292
|
+
}
|
|
293
|
+
export type HubToolExecutorName = "readFile" | "search" | "bash" | "webFetch" | "editor" | "applyPatch" | "skills" | "askQuestion" | "submit";
|
|
294
|
+
export declare const HUB_TOOL_EXECUTOR_NAMES: readonly ["readFile", "search", "bash", "webFetch", "editor", "applyPatch", "skills", "askQuestion", "submit"];
|
|
295
|
+
export declare function isHubToolExecutorName(value: unknown): value is HubToolExecutorName;
|
|
296
|
+
export declare const HUB_TOOL_EXECUTOR_CAPABILITY_PREFIX = "tool_executor.";
|
|
297
|
+
export declare const HUB_CUSTOM_TOOL_CAPABILITY_PREFIX = "custom_tool.";
|
|
298
|
+
export declare const HUB_HOOK_CAPABILITY_PREFIX = "hook.";
|
|
299
|
+
export declare const HUB_COMPACTION_CAPABILITY = "compaction.compact";
|
|
300
|
+
export declare const HUB_CHECKPOINT_CAPABILITY = "checkpoint.create";
|
|
301
|
+
export declare const HUB_MISTAKE_LIMIT_CAPABILITY = "mistake_limit.decide";
|
|
302
|
+
export declare const HUB_USER_INSTRUCTIONS_SNAPSHOT_CAPABILITY = "user_instructions.snapshot";
|
|
303
|
+
export type HubClientContributionKind = "toolExecutor" | "tool" | "hook" | "compaction" | "checkpoint" | "mistakeLimit" | "userInstructionService";
|
|
304
|
+
export interface HubClientContributionBase {
|
|
305
|
+
kind: HubClientContributionKind;
|
|
306
|
+
capabilityName: string;
|
|
307
|
+
}
|
|
308
|
+
export interface HubClientToolExecutorContribution extends HubClientContributionBase {
|
|
309
|
+
kind: "toolExecutor";
|
|
310
|
+
executor: HubToolExecutorName;
|
|
311
|
+
}
|
|
312
|
+
export interface HubClientToolContribution extends HubClientContributionBase {
|
|
313
|
+
kind: "tool";
|
|
314
|
+
name: string;
|
|
315
|
+
description: string;
|
|
316
|
+
inputSchema: Record<string, JsonValue | undefined>;
|
|
317
|
+
lifecycle?: Record<string, JsonValue | undefined>;
|
|
318
|
+
}
|
|
319
|
+
export interface HubClientHookContribution extends HubClientContributionBase {
|
|
320
|
+
kind: "hook";
|
|
321
|
+
name: string;
|
|
322
|
+
}
|
|
323
|
+
export interface HubClientCompactionContribution extends HubClientContributionBase {
|
|
324
|
+
kind: "compaction";
|
|
325
|
+
config?: Record<string, JsonValue | undefined>;
|
|
326
|
+
}
|
|
327
|
+
export interface HubClientCheckpointContribution extends HubClientContributionBase {
|
|
328
|
+
kind: "checkpoint";
|
|
329
|
+
config?: Record<string, JsonValue | undefined>;
|
|
330
|
+
}
|
|
331
|
+
export interface HubClientMistakeLimitContribution extends HubClientContributionBase {
|
|
332
|
+
kind: "mistakeLimit";
|
|
333
|
+
}
|
|
334
|
+
export interface HubClientUserInstructionServiceContribution extends HubClientContributionBase {
|
|
335
|
+
kind: "userInstructionService";
|
|
336
|
+
}
|
|
337
|
+
export type HubClientContribution = HubClientToolExecutorContribution | HubClientToolContribution | HubClientHookContribution | HubClientCompactionContribution | HubClientCheckpointContribution | HubClientMistakeLimitContribution | HubClientUserInstructionServiceContribution;
|
|
338
|
+
export interface HubSessionRuntimeOptions {
|
|
339
|
+
mode?: "act" | "plan" | "yolo";
|
|
340
|
+
systemPrompt?: string;
|
|
341
|
+
maxIterations?: number;
|
|
342
|
+
timeoutSeconds?: number;
|
|
343
|
+
thinking?: boolean;
|
|
344
|
+
reasoningEffort?: ReasoningEffort;
|
|
345
|
+
checkpointEnabled?: boolean;
|
|
346
|
+
enableTools?: boolean;
|
|
347
|
+
enableSpawn?: boolean;
|
|
348
|
+
enableTeams?: boolean;
|
|
349
|
+
autoApproveTools?: boolean;
|
|
350
|
+
configExtensions?: RuntimeConfigExtensionKind[];
|
|
351
|
+
clientContributions?: HubClientContribution[];
|
|
352
|
+
}
|
|
353
|
+
export interface HubSessionCreateInput {
|
|
354
|
+
workspaceRoot: string;
|
|
355
|
+
cwd?: string;
|
|
356
|
+
sessionConfig?: Record<string, JsonValue | undefined>;
|
|
357
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
358
|
+
toolPolicies?: Record<string, JsonValue | undefined>;
|
|
359
|
+
initialMessages?: AgentMessage[];
|
|
360
|
+
agentId?: string;
|
|
361
|
+
agentRole?: string;
|
|
362
|
+
team?: HubTeamMembership;
|
|
363
|
+
modelSelection?: GatewayModelSelection;
|
|
364
|
+
runtimeOptions?: HubSessionRuntimeOptions;
|
|
365
|
+
}
|
|
366
|
+
export interface HubModelCatalogProvider {
|
|
367
|
+
id: string;
|
|
368
|
+
name: string;
|
|
369
|
+
enabled: boolean;
|
|
370
|
+
defaultModelId?: string;
|
|
371
|
+
}
|
|
372
|
+
export interface HubModelCatalogModel {
|
|
373
|
+
id: string;
|
|
374
|
+
name?: string;
|
|
375
|
+
supportsThinking?: boolean;
|
|
376
|
+
}
|
|
377
|
+
export interface HubModelCatalog {
|
|
378
|
+
providers: HubModelCatalogProvider[];
|
|
379
|
+
modelsByProvider: Record<string, HubModelCatalogModel[]>;
|
|
380
|
+
defaultSelection?: GatewayModelSelection;
|
|
381
|
+
defaultWorkspaceRoot?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface HubSessionAttachInput {
|
|
384
|
+
sessionId: string;
|
|
385
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
386
|
+
role?: SessionParticipant["role"];
|
|
387
|
+
}
|
|
388
|
+
export interface HubSessionUpdateInput {
|
|
389
|
+
sessionId: string;
|
|
390
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
391
|
+
}
|
|
392
|
+
export interface HubSessionDeleteInput {
|
|
393
|
+
sessionId: string;
|
|
394
|
+
deleteCheckpointRefs?: boolean;
|
|
395
|
+
}
|
|
396
|
+
export interface HubRunStartInput {
|
|
397
|
+
sessionId: string;
|
|
398
|
+
input?: string | AgentMessage | AgentMessage[];
|
|
399
|
+
}
|
|
400
|
+
export interface HubApprovalRequestInput {
|
|
401
|
+
sessionId: string;
|
|
402
|
+
targetClientId?: string;
|
|
403
|
+
payload: Record<string, JsonValue | undefined>;
|
|
404
|
+
}
|
|
405
|
+
export interface HubApprovalRespondInput {
|
|
406
|
+
approvalId: string;
|
|
407
|
+
approved: boolean;
|
|
408
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
409
|
+
}
|
|
410
|
+
export interface HubCapabilityRequestInput {
|
|
411
|
+
sessionId: string;
|
|
412
|
+
capabilityName: string;
|
|
413
|
+
targetClientId?: string;
|
|
414
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
415
|
+
}
|
|
416
|
+
export interface HubCapabilityRespondInput {
|
|
417
|
+
requestId: string;
|
|
418
|
+
ok: boolean;
|
|
419
|
+
payload?: Record<string, JsonValue | undefined>;
|
|
420
|
+
error?: string;
|
|
421
|
+
}
|
|
422
|
+
export interface HubPeerRegisterInput {
|
|
423
|
+
peerHubId?: string;
|
|
424
|
+
transport?: Extract<HubTransportKind, "peer-grpc" | "remote" | "native">;
|
|
425
|
+
metadata?: Record<string, JsonValue | undefined>;
|
|
426
|
+
}
|
|
427
|
+
export interface HubPeerAttachSessionInput {
|
|
428
|
+
peerHubId: string;
|
|
429
|
+
sessionId: string;
|
|
430
|
+
}
|
|
431
|
+
export interface HubStateSnapshot {
|
|
432
|
+
hubId: string;
|
|
433
|
+
protocolVersion: HubProtocolVersion;
|
|
434
|
+
sessions: SessionRecord[];
|
|
435
|
+
spokes: SpokeRecord[];
|
|
436
|
+
approvals: ApprovalRequestRecord[];
|
|
437
|
+
capabilityRequests: CapabilityRequestRecord[];
|
|
438
|
+
peers: PeerHubRecord[];
|
|
439
|
+
schedules?: ScheduleRecord[];
|
|
440
|
+
scheduleExecutions?: ScheduleExecutionRecord[];
|
|
441
|
+
}
|
|
442
|
+
export type HubTransportFrame = {
|
|
443
|
+
kind: "command";
|
|
444
|
+
envelope: HubCommandEnvelope;
|
|
445
|
+
} | {
|
|
446
|
+
kind: "reply";
|
|
447
|
+
envelope: HubReplyEnvelope;
|
|
448
|
+
} | {
|
|
449
|
+
kind: "stream.subscribe";
|
|
450
|
+
clientId: string;
|
|
451
|
+
sessionId?: string;
|
|
452
|
+
} | {
|
|
453
|
+
kind: "stream.unsubscribe";
|
|
454
|
+
clientId: string;
|
|
455
|
+
sessionId?: string;
|
|
456
|
+
} | {
|
|
457
|
+
kind: "event";
|
|
458
|
+
envelope: HubEventEnvelope;
|
|
459
|
+
};
|
|
460
|
+
export interface HubUINotifyPayload {
|
|
461
|
+
title: string;
|
|
462
|
+
body: string;
|
|
463
|
+
severity?: "info" | "warning" | "error";
|
|
464
|
+
sessionId?: string;
|
|
465
|
+
clientId?: string;
|
|
466
|
+
}
|
|
467
|
+
export interface HubUIShowWindowPayload {
|
|
468
|
+
windowId?: string;
|
|
469
|
+
focus?: boolean;
|
|
470
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export * from "./agent";
|
|
2
|
+
export * from "./agents";
|
|
3
|
+
export type { ConnectorAuthorizationDecision, ConnectorAuthorizationRequest, ConnectorEventActor, ConnectorEventContext, ConnectorHookEvent, ConnectorHookEventName, } from "./connectors/events";
|
|
4
|
+
export { ConnectorAuthorizationDecisionSchema, ConnectorAuthorizationRequestSchema, ConnectorEventActorSchema, ConnectorEventContextSchema, ConnectorHookEventNameSchema, ConnectorHookEventSchema, } from "./connectors/events";
|
|
5
|
+
export type * from "./connectors/options";
|
|
6
|
+
export type { AutomationEventEnvelope } from "./cron";
|
|
7
|
+
export type { ClientContext, ClientName, ExtensionContext, UserContext, WorkspaceContext, } from "./extensions/context";
|
|
8
|
+
export type { AgentExtensionApi, AgentExtensionAutomationContext, AgentExtensionAutomationEventType, AgentExtensionCapability, AgentExtensionCommand, AgentExtensionHooks, AgentExtensionMessageBuilder, AgentExtensionProvider, AgentExtensionRegistry, AgentExtensionRule, AgentExtensionSessionContext, ContributionRegistryExtension, ContributionRegistryOptions, PluginManifest, PluginSetupContext, } from "./extensions/contribution-registry";
|
|
9
|
+
export { ContributionRegistry, createContributionRegistry, normalizePluginManifest, } from "./extensions/contribution-registry";
|
|
10
|
+
export { PLUGIN_FILE_EXTENSIONS } from "./extensions/plugin";
|
|
11
|
+
export type { HookControl } from "./hooks/contracts";
|
|
12
|
+
export type { AgentAbortHookPayload, AgentEndHookPayload, AgentErrorHookPayload, AgentResumeHookPayload, AgentStartHookPayload, HookEventName, HookEventPayload, HookEventPayloadBase, PostToolUseData, PreCompactData, PreCompactHookPayload, PreToolUseData, PromptSubmitHookPayload, SessionShutdownHookPayload, TaskCancelData, TaskCompleteData, TaskResumeData, TaskStartData, ToolCallHookPayload, ToolResultHookPayload, UserPromptSubmitData, } from "./hooks/events";
|
|
13
|
+
export { HookEventNameSchema, HookEventPayloadSchema, parseHookEventPayload, } from "./hooks/events";
|
|
14
|
+
export * from "./hub";
|
|
15
|
+
export type { AiSdkFormatterMessage, AiSdkFormatterMessageRole, AiSdkFormatterPart, AiSdkMessage, AiSdkMessagePart, } from "./llms/ai-sdk-format";
|
|
16
|
+
export { formatMessagesForAiSdk, sanitizeSurrogates, toAiSdkToolResultOutput, } from "./llms/ai-sdk-format";
|
|
17
|
+
export type * from "./llms/gateway";
|
|
18
|
+
export type { ContentBlock, FileContent, ImageContent, Message, MessageRole, MessageWithMetadata, RedactedThinkingContent, TextContent, ThinkingContent, ToolDefinition, ToolResultContent, ToolUseContent, } from "./llms/messages";
|
|
19
|
+
export { ApiFormat, ApiFormatSchema, type ModelCapability, ModelCapabilitySchema, type ModelInfo, ModelInfoSchema, type ModelMetadata, ModelMetadataSchema, type ModelPricing, ModelPricingSchema, type ModelStatus, ModelStatusSchema, type ThinkingConfig, ThinkingConfigSchema, } from "./llms/model-info";
|
|
20
|
+
export { DEFAULT_REASONING_EFFORT, REASONING_EFFORT_RATIOS, resolveEffectiveReasoningEffort, resolveReasoningBudgetFromRatio, resolveReasoningEffortRatio, } from "./llms/reasoning-effort";
|
|
21
|
+
export { DEFAULT_REQUEST_HEADERS, serializeAbortReason } from "./llms/requests";
|
|
22
|
+
export { estimateTokens } from "./llms/tokens";
|
|
23
|
+
export type { ToolApprovalRequest, ToolApprovalResult, ToolCallRecord, ToolPolicy, } from "./llms/tools";
|
|
24
|
+
export { ToolCallRecordSchema } from "./llms/tools";
|
|
25
|
+
export { type BasicLogger, type BasicLogMetadata, noopBasicLogger, } from "./logging/logger";
|
|
26
|
+
export { parseJsonStream, safeJsonParse, safeJsonStringify, } from "./parse/json";
|
|
27
|
+
export { getDefaultShell, getShellArgs } from "./parse/shell";
|
|
28
|
+
export { maskSecret, sanitizeFileName, truncateSplit, truncateStr, } from "./parse/string";
|
|
29
|
+
export { formatHumanReadableDate, formatUptime } from "./parse/time";
|
|
30
|
+
export { validateWithZod, zodToJsonSchema } from "./parse/zod";
|
|
31
|
+
export type { ClineSystemPromptOptions } from "./prompt/cline";
|
|
32
|
+
export { buildClineSystemPrompt } from "./prompt/cline";
|
|
33
|
+
export { formatDisplayUserInput, formatFileContentBlock, formatUserCommandBlock, formatUserInputBlock, normalizeUserInput, parseUserCommandEnvelope, xmlTagsRemoval, } from "./prompt/format";
|
|
34
|
+
export { REMOTE_URI_SCHEME } from "./remote-config/constants";
|
|
35
|
+
export type { AnthropicModel, AnthropicSettings, APIKeySettings, AwsBedrockCustomModel, AwsBedrockModel, AwsBedrockSettings, EnterpriseTelemetry, GlobalInstructionsFile, LiteLLMModel, LiteLLMSettings, MCPServer, OpenAiCompatible, OpenAiCompatibleModel, PromptUploading, ProviderSettings, RemoteConfig, RemoteMCPServer, S3AccessKeySettings, VertexModel, VertexSettings, } from "./remote-config/schema";
|
|
36
|
+
export { AllowedMCPServerSchema, AnthropicModelSchema, AnthropicSchema, APIKeySchema, AwsBedrockCustomModelSchema, AwsBedrockModelSchema, AwsBedrockSettingsSchema, ClineModelSchema, ClineSettingsSchema, EnterpriseTelemetrySchema, GlobalInstructionsFileSchema, LiteLLMModelSchema, LiteLLMSchema, OpenAiCompatibleModelSchema, OpenAiCompatibleSchema, PromptUploadingSchema, RemoteConfigSchema, RemoteMCPServerSchema, S3AccessKeySettingsSchema, VertexModelSchema, VertexSettingsSchema, } from "./remote-config/schema";
|
|
37
|
+
export { CLINE_DEFAULT_RPC_ADDRESS, CLINE_DEFAULT_RPC_PORT } from "./rpc";
|
|
38
|
+
export type { AddProviderActionRequest, ChatAttachmentFile, ChatAttachments, ChatRunTurnRequest, ChatRuntimeConfig, ChatStartSessionArtifacts, ChatStartSessionRequest, ChatStartSessionResponse, ChatToolCallResult, ChatTurnResult, ClineAccountActionRequest, EnterpriseAuthenticateRequest, EnterpriseAuthenticateResponse, EnterpriseStatusRequest, EnterpriseStatusResponse, EnterpriseSyncRequest, EnterpriseSyncResponse, GetProviderModelsActionRequest, ListProvidersActionRequest, ProviderActionRequest, ProviderCapability, ProviderCatalogResponse, ProviderClient, ProviderListItem, ProviderModel, ProviderModelsResponse, ProviderOAuthLoginResponse, ProviderProtocol, ProviderSettingsActionRequest, RuntimeLoggerConfig, SaveProviderSettingsActionRequest, } from "./rpc/runtime";
|
|
39
|
+
export { ProviderCapabilitySchema, ProviderClientSchema, ProviderProtocolSchema, } from "./rpc/runtime";
|
|
40
|
+
export type { TeamProgressCounts, TeamProgressLifecycleEvent, TeamProgressMemberRole, TeamProgressMemberStatus, TeamProgressOutcomeFragmentStatus, TeamProgressOutcomeStatus, TeamProgressProjectionEvent, TeamProgressRunStatus, TeamProgressSummary, TeamProgressTaskStatus, } from "./rpc/team-progress";
|
|
41
|
+
export { TEAM_LIFECYCLE_EVENT_TYPE, TEAM_PROGRESS_EVENT_TYPE, } from "./rpc/team-progress";
|
|
42
|
+
export type { ClineEnvironment, ClineEnvironmentConfig, ResolveClineEnvironmentOptions, } from "./runtime/cline-environment";
|
|
43
|
+
export { CLINE_ENVIRONMENT_ENV, CLINE_ENVIRONMENT_OVERRIDE_ENV, CLINE_ENVIRONMENTS, DEFAULT_CLINE_ENVIRONMENT, getClineEnvironmentConfig, resolveClineEnvironment, } from "./runtime/cline-environment";
|
|
44
|
+
export type { CaptureSdkErrorInput, ITelemetryService, OpenTelemetryClientConfig, SdkTelemetryErrorComponent, SdkTelemetryErrorSeverity, TelemetryArray, TelemetryMetadata, TelemetryObject, TelemetryPrimitive, TelemetryProperties, TelemetryValue, } from "./services/telemetry";
|
|
45
|
+
export { buildSdkErrorProperties, captureSdkError, normalizeSdkError, SDK_ERROR_TELEMETRY_EVENT, } from "./services/telemetry";
|
|
46
|
+
export type { ClineTelemetryServiceConfig } from "./services/telemetry-config";
|
|
47
|
+
export { createClineTelemetryServiceConfig, createClineTelemetryServiceMetadata, } from "./services/telemetry-config";
|
|
48
|
+
export type { HookSessionContext, HookSessionContextLookup, HookSessionContextProvider, } from "./session/hook-context";
|
|
49
|
+
export { resolveHookSessionContext, resolveRootSessionId, } from "./session/hook-context";
|
|
50
|
+
export { createSessionId } from "./session/index";
|
|
51
|
+
export type { SessionLineage, SessionRuntimeRecordShape, SharedSessionStatus, } from "./session/records";
|
|
52
|
+
export { SESSION_STATUS_VALUES } from "./session/records";
|
|
53
|
+
export type { AgentMode, RuntimeConfigExtensionKind, SessionExecutionConfig, SessionPromptConfig, SessionWorkspaceConfig, } from "./session/runtime-config";
|
|
54
|
+
export { DEFAULT_RUNTIME_CONFIG_EXTENSIONS, hasRuntimeConfigExtension, isRuntimeConfigExtensionKind, parseRuntimeConfigExtensions, RUNTIME_CONFIG_EXTENSION_KINDS, } from "./session/runtime-config";
|
|
55
|
+
export type { RuntimeEnv } from "./session/runtime-env";
|
|
56
|
+
export * from "./session/workspace";
|
|
57
|
+
export * from "./team";
|
|
58
|
+
export { createTool } from "./tools/create";
|
|
59
|
+
export type { OAuthProviderId } from "./types/auth";
|
|
60
|
+
export { AUTH_ERROR_PATTERNS, isLikelyAuthError, isOAuthProviderId, OAUTH_PROVIDER_IDS, } from "./types/auth";
|
|
61
|
+
export type { VcrRecording } from "./types/vcr";
|