@sctg/cline-core 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 +110 -0
- package/dist/ClineCore.d.ts +283 -0
- package/dist/account/cline-account-service.d.ts +37 -0
- package/dist/account/index.d.ts +3 -0
- package/dist/account/rpc.d.ts +40 -0
- package/dist/account/types.d.ts +98 -0
- package/dist/auth/bounded-ttl-cache.d.ts +13 -0
- package/dist/auth/client.d.ts +30 -0
- package/dist/auth/cline.d.ts +64 -0
- package/dist/auth/codex.d.ts +43 -0
- package/dist/auth/oca.d.ts +28 -0
- package/dist/auth/server.d.ts +54 -0
- package/dist/auth/types.d.ts +103 -0
- package/dist/auth/utils.d.ts +32 -0
- package/dist/cline-core/automation.d.ts +34 -0
- package/dist/cline-core/runtime-services.d.ts +5 -0
- package/dist/cline-core/start-input.d.ts +10 -0
- package/dist/cline-core/telemetry.d.ts +10 -0
- package/dist/cline-core/types.d.ts +221 -0
- package/dist/cron/events/cron-event-ingress.d.ts +37 -0
- package/dist/cron/reports/cron-report-writer.d.ts +40 -0
- package/dist/cron/runner/cron-materializer.d.ts +35 -0
- package/dist/cron/runner/cron-runner.d.ts +47 -0
- package/dist/cron/runner/resource-limiter.d.ts +8 -0
- package/dist/cron/schedule/scheduler.d.ts +12 -0
- package/dist/cron/service/cron-service.d.ts +56 -0
- package/dist/cron/service/schedule-command-service.d.ts +9 -0
- package/dist/cron/service/schedule-service.d.ts +98 -0
- package/dist/cron/specs/cron-reconciler.d.ts +61 -0
- package/dist/cron/specs/cron-spec-parser.d.ts +26 -0
- package/dist/cron/specs/cron-watcher.d.ts +22 -0
- package/dist/cron/store/cron-schema.d.ts +2 -0
- package/dist/cron/store/sqlite-cron-store.d.ts +240 -0
- package/dist/extensions/config/index.d.ts +7 -0
- package/dist/extensions/config/runtime-commands.d.ts +11 -0
- package/dist/extensions/config/skill-frontmatter-toggle.d.ts +11 -0
- package/dist/extensions/config/unified-config-file-watcher.d.ts +77 -0
- package/dist/extensions/config/user-instruction-config-loader.d.ts +64 -0
- package/dist/extensions/config/user-instruction-plugin.d.ts +25 -0
- package/dist/extensions/config/user-instruction-service.d.ts +23 -0
- package/dist/extensions/context/agentic-compaction.d.ts +12 -0
- package/dist/extensions/context/basic-compaction.d.ts +8 -0
- package/dist/extensions/context/compaction-shared.d.ts +61 -0
- package/dist/extensions/context/compaction.d.ts +38 -0
- package/dist/extensions/index.d.ts +5 -0
- package/dist/extensions/mcp/client.d.ts +9 -0
- package/dist/extensions/mcp/config-loader.d.ts +25 -0
- package/dist/extensions/mcp/index.d.ts +11 -0
- package/dist/extensions/mcp/manager.d.ts +23 -0
- package/dist/extensions/mcp/name-transform.d.ts +2 -0
- package/dist/extensions/mcp/oauth.d.ts +48 -0
- package/dist/extensions/mcp/policies.d.ts +14 -0
- package/dist/extensions/mcp/tools.d.ts +3 -0
- package/dist/extensions/mcp/types.d.ts +111 -0
- package/dist/extensions/plugin/plugin-config-loader.d.ts +40 -0
- package/dist/extensions/plugin/plugin-load-report.d.ts +18 -0
- package/dist/extensions/plugin/plugin-loader.d.ts +22 -0
- package/dist/extensions/plugin/plugin-module-import.d.ts +4 -0
- package/dist/extensions/plugin/plugin-sandbox.d.ts +36 -0
- package/dist/extensions/plugin/plugin-targeting.d.ts +6 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -0
- package/dist/extensions/tools/constants.d.ts +24 -0
- package/dist/extensions/tools/definitions.d.ts +102 -0
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts +68 -0
- package/dist/extensions/tools/executors/apply-patch.d.ts +28 -0
- package/dist/extensions/tools/executors/bash.d.ts +49 -0
- package/dist/extensions/tools/executors/editor.d.ts +31 -0
- package/dist/extensions/tools/executors/file-read.d.ts +40 -0
- package/dist/extensions/tools/executors/index.d.ts +50 -0
- package/dist/extensions/tools/executors/search.d.ts +50 -0
- package/dist/extensions/tools/executors/web-fetch.d.ts +58 -0
- package/dist/extensions/tools/helpers.d.ts +15 -0
- package/dist/extensions/tools/index.d.ts +59 -0
- package/dist/extensions/tools/model-tool-routing.d.ts +33 -0
- package/dist/extensions/tools/presets.d.ts +132 -0
- package/dist/extensions/tools/runtime.d.ts +24 -0
- package/dist/extensions/tools/schemas.d.ts +241 -0
- package/dist/extensions/tools/team/delegated-agent.d.ts +43 -0
- package/dist/extensions/tools/team/index.d.ts +2 -0
- package/dist/extensions/tools/team/multi-agent.d.ts +230 -0
- package/dist/extensions/tools/team/projections.d.ts +8 -0
- package/dist/extensions/tools/team/runtime.d.ts +4 -0
- package/dist/extensions/tools/team/spawn-agent-tool.d.ts +84 -0
- package/dist/extensions/tools/team/subagent-prompts.d.ts +3 -0
- package/dist/extensions/tools/team/team-tools.d.ts +35 -0
- package/dist/extensions/tools/types.d.ts +254 -0
- package/dist/hooks/checkpoint-hooks.d.ts +45 -0
- package/dist/hooks/hook-extension.d.ts +2 -0
- package/dist/hooks/hook-file-config.d.ts +24 -0
- package/dist/hooks/hook-file-hooks.d.ts +21 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/subprocess-runner.d.ts +21 -0
- package/dist/hooks/subprocess.d.ts +68 -0
- package/dist/hub/client/connect.d.ts +14 -0
- package/dist/hub/client/index.d.ts +88 -0
- package/dist/hub/client/session-client.d.ts +118 -0
- package/dist/hub/client/ui-client.d.ts +45 -0
- package/dist/hub/daemon/entry.d.ts +1 -0
- package/dist/hub/daemon/entry.js +722 -0
- package/dist/hub/daemon/index.d.ts +9 -0
- package/dist/hub/daemon/runtime-handlers.d.ts +12 -0
- package/dist/hub/daemon/start-shared-server.d.ts +18 -0
- package/dist/hub/discovery/defaults.d.ts +16 -0
- package/dist/hub/discovery/index.d.ts +30 -0
- package/dist/hub/discovery/workspace.d.ts +3 -0
- package/dist/hub/index.d.ts +32 -0
- package/dist/hub/index.js +719 -0
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +76 -0
- package/dist/hub/runtime-host/remote-runtime-host.d.ts +9 -0
- package/dist/hub/server/browser-websocket.d.ts +19 -0
- package/dist/hub/server/command-transport.d.ts +7 -0
- package/dist/hub/server/handlers/approval-handlers.d.ts +17 -0
- package/dist/hub/server/handlers/capability-handlers.d.ts +12 -0
- package/dist/hub/server/handlers/client-handlers.d.ts +6 -0
- package/dist/hub/server/handlers/context.d.ts +57 -0
- package/dist/hub/server/handlers/run-handlers.d.ts +5 -0
- package/dist/hub/server/handlers/session-event-projector.d.ts +7 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +20 -0
- package/dist/hub/server/hub-client-contributions.d.ts +19 -0
- package/dist/hub/server/hub-notifications.d.ts +7 -0
- package/dist/hub/server/hub-schedule-events.d.ts +2 -0
- package/dist/hub/server/hub-server-logging.d.ts +2 -0
- package/dist/hub/server/hub-server-options.d.ts +55 -0
- package/dist/hub/server/hub-server-transport.d.ts +37 -0
- package/dist/hub/server/hub-session-records.d.ts +9 -0
- package/dist/hub/server/hub-websocket-server.d.ts +6 -0
- package/dist/hub/server/index.d.ts +4 -0
- package/dist/hub/server/native-transport.d.ts +16 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +717 -0
- package/dist/remote-config/integration.d.ts +17 -0
- package/dist/runtime/capabilities/index.d.ts +2 -0
- package/dist/runtime/capabilities/normalize-runtime-capabilities.d.ts +2 -0
- package/dist/runtime/capabilities/runtime-capabilities.d.ts +6 -0
- package/dist/runtime/config/agent-message-codec.d.ts +6 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +80 -0
- package/dist/runtime/host/history.d.ts +19 -0
- package/dist/runtime/host/host.d.ts +7 -0
- package/dist/runtime/host/local/agent-event-bridge.d.ts +30 -0
- package/dist/runtime/host/local/session-record.d.ts +6 -0
- package/dist/runtime/host/local/session-service-invoker.d.ts +4 -0
- package/dist/runtime/host/local/spawn-tool.d.ts +15 -0
- package/dist/runtime/host/local/user-files.d.ts +1 -0
- package/dist/runtime/host/local-runtime-host.d.ts +127 -0
- package/dist/runtime/host/runtime-host-support.d.ts +20 -0
- package/dist/runtime/host/runtime-host.d.ts +169 -0
- package/dist/runtime/orchestration/runtime-builder.d.ts +6 -0
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +101 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +30 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +218 -0
- package/dist/runtime/orchestration/session-runtime.d.ts +58 -0
- package/dist/runtime/orchestration/user-input-builder.d.ts +15 -0
- package/dist/runtime/safety/loop-detection.d.ts +58 -0
- package/dist/runtime/safety/mistake-tracker.d.ts +68 -0
- package/dist/runtime/safety/rules.d.ts +6 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +43 -0
- package/dist/runtime/tools/tool-approval.d.ts +9 -0
- package/dist/runtime/turn-queue/pending-prompt-service.d.ts +69 -0
- package/dist/services/agent-events.d.ts +34 -0
- package/dist/services/config.d.ts +2 -0
- package/dist/services/global-settings.d.ts +34 -0
- package/dist/services/llms/cline-recommended-models.d.ts +19 -0
- package/dist/services/llms/configured-provider-registry.d.ts +27 -0
- package/dist/services/llms/handler-factory.d.ts +3 -0
- package/dist/services/llms/provider-defaults.d.ts +28 -0
- package/dist/services/llms/provider-settings.d.ts +250 -0
- package/dist/services/llms/runtime-config.d.ts +3 -0
- package/dist/services/llms/runtime-registry.d.ts +19 -0
- package/dist/services/llms/runtime-types.d.ts +84 -0
- package/dist/services/local-runtime-bootstrap.d.ts +45 -0
- package/dist/services/plugin-tools.d.ts +28 -0
- package/dist/services/providers/local-provider-registry.d.ts +230 -0
- package/dist/services/providers/local-provider-service.d.ts +70 -0
- package/dist/services/providers/model-source.d.ts +3 -0
- package/dist/services/providers/provider-config-fields.d.ts +37 -0
- package/dist/services/session-artifacts.d.ts +17 -0
- package/dist/services/session-data.d.ts +51 -0
- package/dist/services/session-telemetry.d.ts +15 -0
- package/dist/services/storage/file-team-store.d.ts +28 -0
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +38 -0
- package/dist/services/storage/provider-settings-manager.d.ts +23 -0
- package/dist/services/storage/sqlite-session-store.d.ts +30 -0
- package/dist/services/storage/sqlite-team-store.d.ts +34 -0
- package/dist/services/storage/team-store.d.ts +15 -0
- package/dist/services/telemetry/ITelemetryAdapter.d.ts +54 -0
- package/dist/services/telemetry/OpenTelemetryAdapter.d.ts +43 -0
- package/dist/services/telemetry/OpenTelemetryProvider.d.ts +83 -0
- package/dist/services/telemetry/TelemetryLoggerSink.d.ts +27 -0
- package/dist/services/telemetry/TelemetryService.d.ts +34 -0
- package/dist/services/telemetry/core-events.d.ts +276 -0
- package/dist/services/telemetry/distinct-id.d.ts +1 -0
- package/dist/services/telemetry/index.d.ts +3 -0
- package/dist/services/telemetry/index.js +1 -0
- package/dist/services/usage.d.ts +19 -0
- package/dist/services/workspace/file-indexer.d.ts +5 -0
- package/dist/services/workspace/index.d.ts +4 -0
- package/dist/services/workspace/mention-enricher.d.ts +13 -0
- package/dist/services/workspace/workspace-manager.d.ts +27 -0
- package/dist/services/workspace/workspace-manifest.d.ts +31 -0
- package/dist/services/workspace/workspace-telemetry.d.ts +18 -0
- package/dist/session/checkpoint-restore.d.ts +20 -0
- package/dist/session/models/session-graph.d.ts +15 -0
- package/dist/session/models/session-manifest.d.ts +31 -0
- package/dist/session/models/session-row.d.ts +92 -0
- package/dist/session/services/file-session-service.d.ts +10 -0
- package/dist/session/services/message-builder.d.ts +66 -0
- package/dist/session/services/persistence-service.d.ts +59 -0
- package/dist/session/services/session-service.d.ts +15 -0
- package/dist/session/session-snapshot.d.ts +59 -0
- package/dist/session/session-versioning-service.d.ts +48 -0
- package/dist/session/stores/conversation-store.d.ts +29 -0
- package/dist/session/stores/session-manifest-store.d.ts +23 -0
- package/dist/session/stores/team-persistence-store.d.ts +23 -0
- package/dist/session/team/index.d.ts +2 -0
- package/dist/session/team/team-child-session-manager.d.ts +35 -0
- package/dist/session/team/team-session-coordinator.d.ts +13 -0
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/settings-service.d.ts +6 -0
- package/dist/settings/types.d.ts +43 -0
- package/dist/types/chat-schema.d.ts +163 -0
- package/dist/types/common.d.ts +24 -0
- package/dist/types/config.d.ts +167 -0
- package/dist/types/events.d.ts +89 -0
- package/dist/types/provider-settings.d.ts +19 -0
- package/dist/types/session.d.ts +122 -0
- package/dist/types/sessions.d.ts +38 -0
- package/dist/types/storage.d.ts +36 -0
- package/dist/types.d.ts +32 -0
- package/dist/version.d.ts +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Tools
|
|
3
|
+
*
|
|
4
|
+
* This module provides a set of configurable default tools for agents.
|
|
5
|
+
*/
|
|
6
|
+
export { validateWithZod, zodToJsonSchema } from "@cline/shared";
|
|
7
|
+
export { ALL_DEFAULT_TOOL_NAMES, DefaultToolNames } from "./constants";
|
|
8
|
+
export { createApplyPatchTool, createAskQuestionTool, createBashTool, createDefaultTools, createEditorTool, createReadFilesTool, createSearchTool, createSkillsTool, createSubmitAndExitTool, createWebFetchTool, createWindowsShellTool, } from "./definitions";
|
|
9
|
+
export { type ApplyPatchExecutorOptions, type BashExecutorOptions, createApplyPatchExecutor, createBashExecutor, createDefaultExecutors, createEditorExecutor, createFileReadExecutor, createSearchExecutor, createWebFetchExecutor, type DefaultExecutorsOptions, type EditorExecutorOptions, type FileReadExecutorOptions, type SearchExecutorOptions, type WebFetchExecutorOptions, } from "./executors/index";
|
|
10
|
+
export { DEFAULT_MODEL_TOOL_ROUTING_RULES, resolveToolRoutingConfig, type ToolRoutingRule, } from "./model-tool-routing";
|
|
11
|
+
export { createDefaultToolsWithPreset, createToolPoliciesWithPreset, resolveToolPresetName, type ToolPolicyPresetName, type ToolPresetName, ToolPresets, } from "./presets";
|
|
12
|
+
export { type BuiltinToolAvailabilityContext, getCoreAcpToolNames, getCoreBuiltinToolCatalog, getCoreDefaultEnabledToolIds, getCoreHeadlessToolNames, resolveCoreSelectedToolIds, type ToolCatalogEntry, } from "./runtime";
|
|
13
|
+
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 SubmitInput, SubmitInputSchema, type WebFetchRequest, WebFetchRequestSchema, } from "./schemas";
|
|
14
|
+
export { TEAM_TOOL_NAMES } from "./team/team-tools";
|
|
15
|
+
export type { ApplyPatchExecutor, AskQuestionExecutor, BashExecutor, CreateDefaultToolsOptions, DefaultToolName, DefaultToolsConfig, EditorExecutor, FileReadExecutor, SearchExecutor, SkillsExecutor, SkillsExecutorSkillMetadata, SkillsExecutorWithMetadata, ToolExecutors, ToolOperationResult, VerifySubmitExecutor, WebFetchExecutor, } from "./types";
|
|
16
|
+
import type { AgentTool } from "@cline/shared";
|
|
17
|
+
import { type DefaultExecutorsOptions } from "./executors/index";
|
|
18
|
+
import type { CreateDefaultToolsOptions, ToolExecutors } from "./types";
|
|
19
|
+
/**
|
|
20
|
+
* Options for creating default tools with built-in executors
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateBuiltinToolsOptions extends Omit<CreateDefaultToolsOptions, "executors"> {
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for the built-in executors
|
|
25
|
+
*/
|
|
26
|
+
executorOptions?: DefaultExecutorsOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Optional executor overrides/additions for tools without built-ins
|
|
29
|
+
*/
|
|
30
|
+
executors?: Partial<ToolExecutors>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create default tools with built-in Node.js executors
|
|
34
|
+
*
|
|
35
|
+
* This is a convenience function that creates the default tools with
|
|
36
|
+
* working implementations using Node.js built-in modules.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { Agent, createBuiltinTools } from "@cline/core"
|
|
41
|
+
*
|
|
42
|
+
* const tools = createBuiltinTools({
|
|
43
|
+
* cwd: "/path/to/project",
|
|
44
|
+
* enableBash: true,
|
|
45
|
+
* enableWebFetch: false, // Disable web fetching
|
|
46
|
+
* executorOptions: {
|
|
47
|
+
* bash: { timeoutMs: 60000 },
|
|
48
|
+
* },
|
|
49
|
+
* })
|
|
50
|
+
*
|
|
51
|
+
* const agent = new Agent({
|
|
52
|
+
* providerId: "anthropic",
|
|
53
|
+
* modelId: "claude-sonnet-4-20250514",
|
|
54
|
+
* systemPrompt: "You are a coding assistant.",
|
|
55
|
+
* tools,
|
|
56
|
+
* })
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function createBuiltinTools(options?: CreateBuiltinToolsOptions): AgentTool[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CoreAgentMode } from "../../types/config";
|
|
2
|
+
import type { DefaultToolName, DefaultToolsConfig } from "./types";
|
|
3
|
+
export interface ToolRoutingRule {
|
|
4
|
+
/**
|
|
5
|
+
* Optional rule label for debugging and logs.
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Which mode the rule applies to.
|
|
10
|
+
* @default "any"
|
|
11
|
+
*/
|
|
12
|
+
mode?: CoreAgentMode | "any";
|
|
13
|
+
/**
|
|
14
|
+
* Case-insensitive substrings that must match the model ID.
|
|
15
|
+
* When omitted/empty, the rule is not constrained by model ID.
|
|
16
|
+
*/
|
|
17
|
+
modelIdIncludes?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Case-insensitive substrings that must match the provider ID.
|
|
20
|
+
* When omitted/empty, the rule is not constrained by provider ID.
|
|
21
|
+
*/
|
|
22
|
+
providerIdIncludes?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Enable these tools when the rule matches.
|
|
25
|
+
*/
|
|
26
|
+
enableTools?: DefaultToolName[];
|
|
27
|
+
/**
|
|
28
|
+
* Disable these tools when the rule matches.
|
|
29
|
+
*/
|
|
30
|
+
disableTools?: DefaultToolName[];
|
|
31
|
+
}
|
|
32
|
+
export declare const DEFAULT_MODEL_TOOL_ROUTING_RULES: ToolRoutingRule[];
|
|
33
|
+
export declare function resolveToolRoutingConfig(providerId: string, modelId: string, mode: CoreAgentMode, rules: ToolRoutingRule[] | undefined): Partial<DefaultToolsConfig>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentTool Presets
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured tool combinations for common use cases.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentMode, AgentTool, ToolPolicy } from "@cline/shared";
|
|
7
|
+
import type { CreateDefaultToolsOptions, DefaultToolsConfig } from "./types";
|
|
8
|
+
export interface ToolPresetConfig extends DefaultToolsConfig {
|
|
9
|
+
enableSpawnAgent?: boolean;
|
|
10
|
+
enableAgentTeams?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Preset configurations for common use cases
|
|
14
|
+
*/
|
|
15
|
+
export declare const ToolPresets: {
|
|
16
|
+
/**
|
|
17
|
+
* Act mode (full development tools)
|
|
18
|
+
* Good for coding assistants and task automation
|
|
19
|
+
*/
|
|
20
|
+
readonly act: {
|
|
21
|
+
readonly enableReadFiles: true;
|
|
22
|
+
readonly enableSearch: true;
|
|
23
|
+
readonly enableBash: true;
|
|
24
|
+
readonly enableWebFetch: true;
|
|
25
|
+
readonly enableApplyPatch: false;
|
|
26
|
+
readonly enableEditor: true;
|
|
27
|
+
readonly enableSkills: true;
|
|
28
|
+
readonly enableAskQuestion: true;
|
|
29
|
+
readonly enableSubmitAndExit: false;
|
|
30
|
+
readonly enableSpawnAgent: true;
|
|
31
|
+
readonly enableAgentTeams: true;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Plan mode (read-only, no shell access)
|
|
35
|
+
* Good for analysis and documentation agents
|
|
36
|
+
*/
|
|
37
|
+
readonly plan: {
|
|
38
|
+
readonly enableReadFiles: true;
|
|
39
|
+
readonly enableSearch: true;
|
|
40
|
+
readonly enableBash: true;
|
|
41
|
+
readonly enableWebFetch: true;
|
|
42
|
+
readonly enableApplyPatch: false;
|
|
43
|
+
readonly enableEditor: false;
|
|
44
|
+
readonly enableSkills: true;
|
|
45
|
+
readonly enableAskQuestion: true;
|
|
46
|
+
readonly enableSubmitAndExit: false;
|
|
47
|
+
readonly enableSpawnAgent: true;
|
|
48
|
+
readonly enableAgentTeams: true;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Search-focused tools (read_files + search_codebase)
|
|
52
|
+
* Good for code exploration and analysis agents
|
|
53
|
+
*/
|
|
54
|
+
readonly search: {
|
|
55
|
+
readonly enableReadFiles: true;
|
|
56
|
+
readonly enableSearch: true;
|
|
57
|
+
readonly enableBash: false;
|
|
58
|
+
readonly enableWebFetch: false;
|
|
59
|
+
readonly enableApplyPatch: false;
|
|
60
|
+
readonly enableEditor: false;
|
|
61
|
+
readonly enableSkills: false;
|
|
62
|
+
readonly enableAskQuestion: false;
|
|
63
|
+
readonly enableSubmitAndExit: false;
|
|
64
|
+
readonly enableSpawnAgent: true;
|
|
65
|
+
readonly enableAgentTeams: true;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Minimal tools for focused tasks
|
|
69
|
+
*/
|
|
70
|
+
readonly minimal: {
|
|
71
|
+
readonly enableReadFiles: false;
|
|
72
|
+
readonly enableSearch: false;
|
|
73
|
+
readonly enableBash: true;
|
|
74
|
+
readonly enableWebFetch: false;
|
|
75
|
+
readonly enableApplyPatch: false;
|
|
76
|
+
readonly enableEditor: false;
|
|
77
|
+
readonly enableSkills: false;
|
|
78
|
+
readonly enableAskQuestion: false;
|
|
79
|
+
readonly enableSubmitAndExit: false;
|
|
80
|
+
readonly enableSpawnAgent: true;
|
|
81
|
+
readonly enableAgentTeams: false;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* YOLO mode (automation-focused tools + no approval required)
|
|
85
|
+
* Good for trusted local automation workflows.
|
|
86
|
+
*/
|
|
87
|
+
readonly yolo: {
|
|
88
|
+
readonly enableReadFiles: true;
|
|
89
|
+
readonly enableSearch: false;
|
|
90
|
+
readonly enableBash: true;
|
|
91
|
+
readonly enableWebFetch: false;
|
|
92
|
+
readonly enableApplyPatch: false;
|
|
93
|
+
readonly enableEditor: true;
|
|
94
|
+
readonly enableSkills: false;
|
|
95
|
+
readonly enableAskQuestion: false;
|
|
96
|
+
readonly enableSubmitAndExit: true;
|
|
97
|
+
readonly enableSpawnAgent: false;
|
|
98
|
+
readonly enableAgentTeams: false;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Type for preset names
|
|
103
|
+
*/
|
|
104
|
+
export type ToolPresetName = keyof typeof ToolPresets;
|
|
105
|
+
export declare function resolveToolPresetName(options: {
|
|
106
|
+
mode?: AgentMode;
|
|
107
|
+
}): ToolPresetName;
|
|
108
|
+
/**
|
|
109
|
+
* AgentTool policy preset names
|
|
110
|
+
*/
|
|
111
|
+
export type ToolPolicyPresetName = "default" | "yolo";
|
|
112
|
+
/**
|
|
113
|
+
* Build tool policies for a preset.
|
|
114
|
+
* `yolo` guarantees tool policies are enabled and auto-approved.
|
|
115
|
+
*/
|
|
116
|
+
export declare function createToolPoliciesWithPreset(presetName: ToolPolicyPresetName): Record<string, ToolPolicy>;
|
|
117
|
+
/**
|
|
118
|
+
* Create default tools using a preset configuration
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const tools = createDefaultToolsWithPreset("plan", {
|
|
123
|
+
* executors: {
|
|
124
|
+
* readFile: async ({ path }) => fs.readFile(path, "utf-8"),
|
|
125
|
+
* search: async (query, cwd) => searchFiles(query, cwd),
|
|
126
|
+
* webFetch: async (url, prompt) => fetchAndAnalyze(url, prompt),
|
|
127
|
+
* },
|
|
128
|
+
* cwd: "/path/to/project",
|
|
129
|
+
* })
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
export declare function createDefaultToolsWithPreset(presetName: ToolPresetName, options: Omit<CreateDefaultToolsOptions, keyof DefaultToolsConfig> & Partial<DefaultToolsConfig>): AgentTool[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CoreAgentMode } from "../../types/config";
|
|
2
|
+
export interface ToolCatalogEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultEnabled: boolean;
|
|
6
|
+
headlessToolNames: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface BuiltinToolAvailabilityContext {
|
|
9
|
+
mode?: CoreAgentMode;
|
|
10
|
+
providerId?: string;
|
|
11
|
+
modelId?: string;
|
|
12
|
+
enableSpawnAgent?: boolean;
|
|
13
|
+
enableAgentTeams?: boolean;
|
|
14
|
+
disabledToolIds?: ReadonlySet<string>;
|
|
15
|
+
}
|
|
16
|
+
export declare function getCoreBuiltinToolCatalog(context?: BuiltinToolAvailabilityContext): ToolCatalogEntry[];
|
|
17
|
+
export declare function getCoreDefaultEnabledToolIds(context?: BuiltinToolAvailabilityContext): string[];
|
|
18
|
+
export declare function resolveCoreSelectedToolIds(input: {
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
allowlist?: string[];
|
|
21
|
+
availabilityContext?: BuiltinToolAvailabilityContext;
|
|
22
|
+
}): Set<string>;
|
|
23
|
+
export declare function getCoreHeadlessToolNames(selectedToolIds: ReadonlySet<string>, context?: BuiltinToolAvailabilityContext): string[];
|
|
24
|
+
export declare function getCoreAcpToolNames(selectedToolIds: ReadonlySet<string>, context?: BuiltinToolAvailabilityContext): string[];
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod Schemas for Default Tool Inputs
|
|
3
|
+
*
|
|
4
|
+
* These schemas define the input structure for each default tool
|
|
5
|
+
* and are used for both validation and JSON Schema generation.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
export declare const INPUT_ARG_CHAR_LIMIT = 6000;
|
|
9
|
+
export declare const ReadFileLineRangeSchema: z.ZodObject<{
|
|
10
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const ReadFileRequestSchema: z.ZodObject<{
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
/**
|
|
19
|
+
* Schema for read_files tool input
|
|
20
|
+
*/
|
|
21
|
+
export declare const ReadFilesInputSchema: z.ZodObject<{
|
|
22
|
+
files: z.ZodArray<z.ZodObject<{
|
|
23
|
+
path: z.ZodString;
|
|
24
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
25
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
/**
|
|
29
|
+
* Union schema for read_files tool input, allowing either a single string, an array of strings, or the full object schema
|
|
30
|
+
*/
|
|
31
|
+
export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
32
|
+
files: z.ZodArray<z.ZodObject<{
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
path: z.ZodString;
|
|
39
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
42
|
+
path: z.ZodString;
|
|
43
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodString>, z.ZodString, z.ZodObject<{
|
|
46
|
+
files: z.ZodObject<{
|
|
47
|
+
path: z.ZodString;
|
|
48
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
49
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
file_paths: z.ZodArray<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
file_paths: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
paths: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
57
|
+
path: z.ZodString;
|
|
58
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
59
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
60
|
+
}, z.core.$strip>]>>;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
paths: z.ZodObject<{
|
|
63
|
+
path: z.ZodString;
|
|
64
|
+
start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
65
|
+
end_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
paths: z.ZodString;
|
|
69
|
+
}, z.core.$strip>]>;
|
|
70
|
+
/**
|
|
71
|
+
* Schema for search_codebase tool input
|
|
72
|
+
*/
|
|
73
|
+
export declare const SearchCodebaseInputSchema: z.ZodObject<{
|
|
74
|
+
queries: z.ZodArray<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
/**
|
|
77
|
+
* Union schema for search_codebase tool input, allowing either a single string, an array of strings, or the full object schema
|
|
78
|
+
*/
|
|
79
|
+
export declare const SearchCodebaseUnionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
80
|
+
queries: z.ZodArray<z.ZodString>;
|
|
81
|
+
}, z.core.$strip>, z.ZodArray<z.ZodString>, z.ZodString, z.ZodObject<{
|
|
82
|
+
queries: z.ZodString;
|
|
83
|
+
}, z.core.$strip>]>;
|
|
84
|
+
/**
|
|
85
|
+
* Schema for run_commands tool input
|
|
86
|
+
*/
|
|
87
|
+
export declare const RunCommandsInputSchema: z.ZodObject<{
|
|
88
|
+
commands: z.ZodArray<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
/**
|
|
91
|
+
* Union schema for run_commands tool input. More flexible.
|
|
92
|
+
*/
|
|
93
|
+
export declare const RunCommandsInputUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
94
|
+
commands: z.ZodArray<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
commands: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
command: z.ZodString;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
cmd: z.ZodString;
|
|
101
|
+
}, z.core.$strip>, z.ZodArray<z.ZodString>, z.ZodString]>;
|
|
102
|
+
export declare const StructuredCommandInputSchema: z.ZodObject<{
|
|
103
|
+
command: z.ZodString;
|
|
104
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export declare const StructuredCommandEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
107
|
+
command: z.ZodString;
|
|
108
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
}, z.core.$strip>]>;
|
|
110
|
+
/**
|
|
111
|
+
* Schema for run_commands tool input
|
|
112
|
+
*/
|
|
113
|
+
export declare const StructuredCommandsInputSchema: z.ZodObject<{
|
|
114
|
+
commands: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
115
|
+
command: z.ZodString;
|
|
116
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
}, z.core.$strip>]>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
/**
|
|
120
|
+
* Union schema for run_commands tool input. More flexible.
|
|
121
|
+
*/
|
|
122
|
+
export declare const StructuredCommandsInputUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
123
|
+
commands: z.ZodArray<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
commands: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
126
|
+
command: z.ZodString;
|
|
127
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
128
|
+
}, z.core.$strip>]>>;
|
|
129
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
+
commands: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
131
|
+
command: z.ZodString;
|
|
132
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
+
}, z.core.$strip>]>;
|
|
134
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
135
|
+
command: z.ZodString;
|
|
136
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
138
|
+
command: z.ZodString;
|
|
139
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
command: z.ZodString;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
cmd: z.ZodString;
|
|
144
|
+
}, z.core.$strip>, z.ZodArray<z.ZodString>, z.ZodString]>;
|
|
145
|
+
/**
|
|
146
|
+
* Schema for a single web fetch request
|
|
147
|
+
*/
|
|
148
|
+
export declare const WebFetchRequestSchema: z.ZodObject<{
|
|
149
|
+
url: z.ZodString;
|
|
150
|
+
prompt: z.ZodString;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
/**
|
|
153
|
+
* Schema for fetch_web_content tool input
|
|
154
|
+
*/
|
|
155
|
+
export declare const FetchWebContentInputSchema: z.ZodObject<{
|
|
156
|
+
requests: z.ZodArray<z.ZodObject<{
|
|
157
|
+
url: z.ZodString;
|
|
158
|
+
prompt: z.ZodString;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
/**
|
|
162
|
+
* Schema for editor tool input
|
|
163
|
+
*/
|
|
164
|
+
export declare const EditFileInputSchema: z.ZodObject<{
|
|
165
|
+
path: z.ZodString;
|
|
166
|
+
old_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
new_text: z.ZodString;
|
|
168
|
+
insert_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
/**
|
|
171
|
+
* Schema for apply_patch tool input
|
|
172
|
+
*/
|
|
173
|
+
export declare const ApplyPatchInputSchema: z.ZodObject<{
|
|
174
|
+
input: z.ZodString;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export declare const ApplyPatchInputUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
177
|
+
input: z.ZodString;
|
|
178
|
+
}, z.core.$strip>, z.ZodString]>;
|
|
179
|
+
/**
|
|
180
|
+
* Schema for skills tool input
|
|
181
|
+
*/
|
|
182
|
+
export declare const SkillsInputSchema: z.ZodObject<{
|
|
183
|
+
skill: z.ZodString;
|
|
184
|
+
args: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
/**
|
|
187
|
+
* Schema for ask_followup_question tool input
|
|
188
|
+
*/
|
|
189
|
+
export declare const AskQuestionInputSchema: z.ZodObject<{
|
|
190
|
+
question: z.ZodString;
|
|
191
|
+
options: z.ZodArray<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export declare const SubmitInputSchema: z.ZodObject<{
|
|
194
|
+
summary: z.ZodString;
|
|
195
|
+
verified: z.ZodBoolean;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
/**
|
|
198
|
+
* Input for a single file read request
|
|
199
|
+
*/
|
|
200
|
+
export type ReadFileRequest = z.infer<typeof ReadFileRequestSchema>;
|
|
201
|
+
/**
|
|
202
|
+
* Input for the read_files tool
|
|
203
|
+
*/
|
|
204
|
+
export type ReadFilesInput = z.infer<typeof ReadFilesInputSchema>;
|
|
205
|
+
/**
|
|
206
|
+
* Input for the search_codebase tool
|
|
207
|
+
*/
|
|
208
|
+
export type SearchCodebaseInput = z.infer<typeof SearchCodebaseInputSchema>;
|
|
209
|
+
/**
|
|
210
|
+
* Input for the run_commands tool
|
|
211
|
+
*/
|
|
212
|
+
export type RunCommandsInput = z.infer<typeof RunCommandsInputSchema>;
|
|
213
|
+
export type StructuredCommandInput = z.infer<typeof StructuredCommandInputSchema>;
|
|
214
|
+
/**
|
|
215
|
+
* Web fetch request parameters
|
|
216
|
+
*/
|
|
217
|
+
export type WebFetchRequest = z.infer<typeof WebFetchRequestSchema>;
|
|
218
|
+
/**
|
|
219
|
+
* Input for the fetch_web_content tool
|
|
220
|
+
*/
|
|
221
|
+
export type FetchWebContentInput = z.infer<typeof FetchWebContentInputSchema>;
|
|
222
|
+
/**
|
|
223
|
+
* Input for the editor tool
|
|
224
|
+
*/
|
|
225
|
+
export type EditFileInput = z.infer<typeof EditFileInputSchema>;
|
|
226
|
+
/**
|
|
227
|
+
* Input for the apply_patch tool
|
|
228
|
+
*/
|
|
229
|
+
export type ApplyPatchInput = z.infer<typeof ApplyPatchInputSchema>;
|
|
230
|
+
/**
|
|
231
|
+
* Input for the skills tool
|
|
232
|
+
*/
|
|
233
|
+
export type SkillsInput = z.infer<typeof SkillsInputSchema>;
|
|
234
|
+
/**
|
|
235
|
+
* Input for the ask_followup_question tool
|
|
236
|
+
*/
|
|
237
|
+
export type AskQuestionInput = z.infer<typeof AskQuestionInputSchema>;
|
|
238
|
+
/**
|
|
239
|
+
* Input for the submit and exit tool
|
|
240
|
+
*/
|
|
241
|
+
export type SubmitInput = z.infer<typeof SubmitInputSchema>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AgentConfig, AgentEvent, AgentHooks, AgentTool, BasicLogger, HookErrorMode, ITelemetryService, ToolApprovalRequest, ToolApprovalResult } from "@cline/shared";
|
|
2
|
+
import { SessionRuntime } from "../../../runtime/orchestration/session-runtime-orchestrator";
|
|
3
|
+
type AgentExtension = NonNullable<AgentConfig["extensions"]>[number];
|
|
4
|
+
export type DelegatedAgentConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "providerConfig" | "knownModels" | "thinking">;
|
|
5
|
+
export interface DelegatedAgentRuntimeConfig extends DelegatedAgentConnectionConfig {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
providerId: string;
|
|
8
|
+
clinePlatform?: string;
|
|
9
|
+
clineIdeName?: string;
|
|
10
|
+
maxIterations?: number;
|
|
11
|
+
hooks?: AgentHooks;
|
|
12
|
+
extensions?: AgentExtension[];
|
|
13
|
+
logger?: BasicLogger;
|
|
14
|
+
telemetry?: ITelemetryService;
|
|
15
|
+
workspaceMetadata?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DelegatedAgentConfigProvider {
|
|
18
|
+
getRuntimeConfig(): DelegatedAgentRuntimeConfig;
|
|
19
|
+
getConnectionConfig(): DelegatedAgentConnectionConfig;
|
|
20
|
+
updateConnectionDefaults(overrides: Partial<DelegatedAgentConnectionConfig>): void;
|
|
21
|
+
}
|
|
22
|
+
export type DelegatedAgentKind = "subagent" | "teammate";
|
|
23
|
+
export interface BuildDelegatedAgentConfigOptions {
|
|
24
|
+
kind: DelegatedAgentKind;
|
|
25
|
+
prompt: string;
|
|
26
|
+
tools: AgentTool[];
|
|
27
|
+
configProvider: DelegatedAgentConfigProvider;
|
|
28
|
+
parentAgentId?: string;
|
|
29
|
+
maxIterations?: number;
|
|
30
|
+
abortSignal?: AbortSignal;
|
|
31
|
+
onEvent?: (event: AgentEvent) => void;
|
|
32
|
+
hookErrorMode?: HookErrorMode;
|
|
33
|
+
toolPolicies?: AgentConfig["toolPolicies"];
|
|
34
|
+
requestToolApproval?: (request: ToolApprovalRequest) => Promise<ToolApprovalResult> | ToolApprovalResult;
|
|
35
|
+
role?: string;
|
|
36
|
+
cwd?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function createDelegatedAgentConfigProvider(initialConfig: DelegatedAgentRuntimeConfig): DelegatedAgentConfigProvider;
|
|
39
|
+
export declare function buildDelegatedAgentConfig(options: BuildDelegatedAgentConfigOptions): AgentConfig & {
|
|
40
|
+
role?: string;
|
|
41
|
+
};
|
|
42
|
+
export declare function createDelegatedAgent(options: BuildDelegatedAgentConfigOptions): SessionRuntime;
|
|
43
|
+
export {};
|