@cline/core 0.0.64 → 0.0.65
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/extensions/tools/definitions.d.ts +21 -3
- package/dist/extensions/tools/index.d.ts +8 -3
- package/dist/extensions/tools/team/delegated-agent.d.ts +1 -1
- package/dist/extensions/tools/types.d.ts +7 -0
- package/dist/hub/daemon/entry.js +157 -157
- package/dist/hub/index.js +154 -154
- package/dist/index.js +155 -155
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +7 -0
- package/dist/services/telemetry/core-events.d.ts +10 -0
- package/dist/services/telemetry/index.js +1 -1
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Factory functions for creating the default tools.
|
|
5
5
|
*/
|
|
6
|
-
import { type AgentTool } from "@cline/shared";
|
|
6
|
+
import { type AgentTool, type ShellKind } from "@cline/shared";
|
|
7
7
|
import { type ApplyPatchInput, type AskQuestionInput, type EditFileInput, type FetchWebContentInput, type ReadFilesInput, type SearchCodebaseInput, type SkillsInput, type SubmitInput } from "./schemas";
|
|
8
8
|
import type { ApplyPatchExecutor, AskQuestionExecutor, CreateDefaultToolsOptions, DefaultToolsConfig, EditorExecutor, FileReadExecutor, SearchExecutor, ShellExecutor, SkillsExecutorWithMetadata, ToolOperationResult, VerifySubmitExecutor, WebFetchExecutor } from "./types";
|
|
9
9
|
/**
|
|
@@ -18,13 +18,31 @@ export declare function createReadFilesTool(executor: FileReadExecutor, config?:
|
|
|
18
18
|
* Performs regex pattern searches across the codebase.
|
|
19
19
|
*/
|
|
20
20
|
export declare function createSearchTool(executor: SearchExecutor, config?: Pick<DefaultToolsConfig, "cwd" | "searchTimeoutMs">): AgentTool<SearchCodebaseInput, ToolOperationResult[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Build the run_commands tool description for the shell that will actually
|
|
23
|
+
* execute the commands. The shell kind decides the syntax guidance (quoting,
|
|
24
|
+
* sequencing, heredocs), and isWindows adds environment context for POSIX
|
|
25
|
+
* shells running on a Windows host (e.g. Git Bash).
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildRunCommandsDescription(shellKind: ShellKind, isWindows: boolean): string;
|
|
21
28
|
/**
|
|
22
29
|
* Create the run_commands shell tool for the current platform.
|
|
23
30
|
*
|
|
24
31
|
* This preserves the SDK's platform-specific prompting/schema choices while
|
|
25
|
-
* exposing a single generic shell-tool factory for host integrations.
|
|
32
|
+
* exposing a single generic shell-tool factory for host integrations. Pass
|
|
33
|
+
* config.shell (matching the executor's shell) so the syntax guidance in the
|
|
34
|
+
* tool description matches the shell that actually runs the commands.
|
|
35
|
+
*
|
|
36
|
+
* config.shell may be a provider function instead of a string. The runtime
|
|
37
|
+
* reads `description` when building each model request, so a provider is
|
|
38
|
+
* consulted at that boundary: a shell change made while the model is
|
|
39
|
+
* generating does not affect the request in flight, and the next request
|
|
40
|
+
* names the new shell. The provider must return the shell the executor will
|
|
41
|
+
* use for tool calls issued by that next request.
|
|
26
42
|
*/
|
|
27
|
-
export declare function createShellTool(executor: ShellExecutor, config?: Pick<DefaultToolsConfig, "cwd" | "bashTimeoutMs">
|
|
43
|
+
export declare function createShellTool(executor: ShellExecutor, config?: Pick<DefaultToolsConfig, "cwd" | "bashTimeoutMs"> & {
|
|
44
|
+
shell?: string | (() => string);
|
|
45
|
+
}): AgentTool<unknown, ToolOperationResult[]>;
|
|
28
46
|
/**
|
|
29
47
|
* Create the fetch_web_content tool
|
|
30
48
|
*
|
|
@@ -14,7 +14,7 @@ export { type BuiltinToolAvailabilityContext, getCoreAcpToolNames, getCoreBuilti
|
|
|
14
14
|
export { type ApplyPatchInput, ApplyPatchInputSchema, type AskQuestionInput, AskQuestionInputSchema, type EditFileInput, EditFileInputSchema, type FetchWebContentInput, FetchWebContentInputSchema, type ReadFileRequest, ReadFileRequestSchema, type ReadFilesInput, ReadFilesInputSchema, type RunCommandsInput, RunCommandsInputSchema, type SearchCodebaseInput, SearchCodebaseInputSchema, type SkillsInput, SkillsInputSchema, type StructuredCommandInput, StructuredCommandInputSchema, type SubmitInput, SubmitInputSchema, type WebFetchRequest, WebFetchRequestSchema, } from "./schemas";
|
|
15
15
|
export { TEAM_TOOL_NAMES } from "./team/team-tools";
|
|
16
16
|
export type { ApplyPatchExecutor, AskQuestionExecutor, CreateDefaultToolsOptions, DefaultToolName, DefaultToolsConfig, EditorExecutor, FileReadExecutor, SearchExecutor, ShellExecutor, SkillsExecutor, SkillsExecutorSkillMetadata, SkillsExecutorWithMetadata, ToolExecutors, ToolOperationResult, VerifySubmitExecutor, WebFetchExecutor, } from "./types";
|
|
17
|
-
import type
|
|
17
|
+
import { type AgentTool } from "@cline/shared";
|
|
18
18
|
import { type DefaultExecutorsOptions } from "./executors/index";
|
|
19
19
|
import type { CreateDefaultToolsOptions, ToolExecutors } from "./types";
|
|
20
20
|
/**
|
|
@@ -22,11 +22,16 @@ import type { CreateDefaultToolsOptions, ToolExecutors } from "./types";
|
|
|
22
22
|
*/
|
|
23
23
|
export interface CreateBuiltinToolsOptions extends Omit<CreateDefaultToolsOptions, "executors"> {
|
|
24
24
|
/**
|
|
25
|
-
* Configuration for the built-in executors
|
|
25
|
+
* Configuration for the built-in executors. `bash.shell` is used when the
|
|
26
|
+
* top-level `shell` option is not set; the top-level option takes precedence.
|
|
26
27
|
*/
|
|
27
28
|
executorOptions?: DefaultExecutorsOptions;
|
|
28
29
|
/**
|
|
29
|
-
* Optional executor overrides/additions for tools without built-ins
|
|
30
|
+
* Optional executor overrides/additions for tools without built-ins.
|
|
31
|
+
* An overriding `bash` executor replaces the built-in one wholesale: it
|
|
32
|
+
* decides its own shell, and the resolved `shell` option only shapes the
|
|
33
|
+
* run_commands description. Overriders must honor that shell themselves
|
|
34
|
+
* to keep the description truthful.
|
|
30
35
|
*/
|
|
31
36
|
executors?: Partial<ToolExecutors>;
|
|
32
37
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentConfig, AgentEvent, AgentHooks, AgentTool, BasicLogger, HookErrorMode, ITelemetryService, ToolApprovalRequest, ToolApprovalResult } from "@cline/shared";
|
|
2
2
|
import { SessionRuntime } from "../../../runtime/orchestration/session-runtime-orchestrator";
|
|
3
3
|
type AgentExtension = NonNullable<AgentConfig["extensions"]>[number];
|
|
4
|
-
export type DelegatedAgentConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "providerConfig" | "knownModels" | "thinking" | "reasoningEffort" | "thinkingBudgetTokens" | "maxTokensPerTurn" | "temperature">;
|
|
4
|
+
export type DelegatedAgentConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "onAuthError" | "providerConfig" | "knownModels" | "thinking" | "reasoningEffort" | "thinkingBudgetTokens" | "maxTokensPerTurn" | "temperature">;
|
|
5
5
|
export interface DelegatedAgentRuntimeConfig extends DelegatedAgentConnectionConfig {
|
|
6
6
|
cwd?: string;
|
|
7
7
|
providerId: string;
|
|
@@ -201,6 +201,13 @@ export interface DefaultToolsConfig {
|
|
|
201
201
|
* Current working directory for tools that need it
|
|
202
202
|
*/
|
|
203
203
|
cwd?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Shell executable (name or full path) the run_commands executor will use.
|
|
206
|
+
* The tool description tells the model which shell syntax to write, so this
|
|
207
|
+
* must match the shell configured on the executor.
|
|
208
|
+
* @default getDefaultShell(process.platform) — "/bin/bash" on Unix, "powershell" on Windows
|
|
209
|
+
*/
|
|
210
|
+
shell?: string;
|
|
204
211
|
/**
|
|
205
212
|
* Timeout for file read operations in milliseconds
|
|
206
213
|
* @default 10000
|