@clinebot/core 0.0.37 → 0.0.38
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 +11 -1
- package/dist/ClineCore.d.ts +18 -214
- package/dist/account/cline-account-service.d.ts +0 -1
- package/dist/account/index.d.ts +0 -1
- package/dist/account/rpc.d.ts +0 -1
- package/dist/account/types.d.ts +0 -1
- package/dist/auth/bounded-ttl-cache.d.ts +0 -1
- package/dist/auth/client.d.ts +0 -1
- package/dist/auth/cline.d.ts +0 -5
- package/dist/auth/codex.d.ts +0 -1
- package/dist/auth/oca.d.ts +0 -1
- package/dist/auth/server.d.ts +0 -1
- package/dist/auth/types.d.ts +0 -1
- package/dist/auth/utils.d.ts +0 -1
- 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/{cron-event-ingress.d.ts → events/cron-event-ingress.d.ts} +1 -2
- package/dist/cron/{cron-report-writer.d.ts → reports/cron-report-writer.d.ts} +1 -2
- package/dist/cron/{cron-materializer.d.ts → runner/cron-materializer.d.ts} +1 -2
- package/dist/cron/{cron-runner.d.ts → runner/cron-runner.d.ts} +6 -4
- package/dist/cron/{resource-limiter.d.ts → runner/resource-limiter.d.ts} +0 -1
- package/dist/cron/schedule/scheduler.d.ts +12 -0
- package/dist/cron/{cron-service.d.ts → service/cron-service.d.ts} +4 -5
- package/dist/cron/{schedule-command-service.d.ts → service/schedule-command-service.d.ts} +0 -1
- package/dist/cron/{schedule-service.d.ts → service/schedule-service.d.ts} +20 -22
- package/dist/cron/{cron-reconciler.d.ts → specs/cron-reconciler.d.ts} +1 -2
- package/dist/cron/{cron-spec-parser.d.ts → specs/cron-spec-parser.d.ts} +0 -1
- package/dist/cron/{cron-watcher.d.ts → specs/cron-watcher.d.ts} +0 -1
- package/dist/cron/{cron-schema.d.ts → store/cron-schema.d.ts} +0 -1
- package/dist/cron/{sqlite-cron-store.d.ts → store/sqlite-cron-store.d.ts} +12 -2
- package/dist/extensions/config/index.d.ts +4 -7
- package/dist/extensions/config/runtime-commands.d.ts +0 -1
- package/dist/extensions/config/skill-frontmatter-toggle.d.ts +11 -0
- package/dist/extensions/config/unified-config-file-watcher.d.ts +0 -1
- package/dist/extensions/config/user-instruction-config-loader.d.ts +0 -1
- 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 +0 -1
- package/dist/extensions/context/basic-compaction.d.ts +0 -1
- package/dist/extensions/context/compaction-shared.d.ts +0 -1
- package/dist/extensions/context/compaction.d.ts +0 -1
- package/dist/extensions/index.d.ts +0 -1
- package/dist/extensions/mcp/client.d.ts +0 -1
- package/dist/extensions/mcp/config-loader.d.ts +0 -1
- package/dist/extensions/mcp/index.d.ts +0 -1
- package/dist/extensions/mcp/manager.d.ts +0 -1
- package/dist/extensions/mcp/name-transform.d.ts +0 -1
- package/dist/extensions/mcp/policies.d.ts +0 -1
- package/dist/extensions/mcp/tools.d.ts +2 -3
- package/dist/extensions/mcp/types.d.ts +3 -4
- package/dist/extensions/plugin/plugin-config-loader.d.ts +0 -1
- package/dist/extensions/plugin/plugin-load-report.d.ts +0 -1
- package/dist/extensions/plugin/plugin-loader.d.ts +0 -1
- package/dist/extensions/plugin/plugin-module-import.d.ts +0 -1
- package/dist/extensions/plugin/plugin-sandbox.d.ts +0 -1
- package/dist/extensions/plugin/plugin-targeting.d.ts +0 -1
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -446
- package/dist/extensions/tools/constants.d.ts +0 -1
- package/dist/extensions/tools/definitions.d.ts +13 -14
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts +0 -1
- package/dist/extensions/tools/executors/apply-patch.d.ts +0 -1
- package/dist/extensions/tools/executors/bash.d.ts +0 -1
- package/dist/extensions/tools/executors/editor.d.ts +0 -1
- package/dist/extensions/tools/executors/file-read.d.ts +0 -1
- package/dist/extensions/tools/executors/index.d.ts +0 -1
- package/dist/extensions/tools/executors/search.d.ts +0 -1
- package/dist/extensions/tools/executors/web-fetch.d.ts +0 -1
- package/dist/extensions/tools/helpers.d.ts +0 -1
- package/dist/extensions/tools/index.d.ts +2 -3
- package/dist/extensions/tools/model-tool-routing.d.ts +0 -1
- package/dist/extensions/tools/presets.d.ts +4 -5
- package/dist/extensions/tools/runtime.d.ts +0 -1
- package/dist/extensions/tools/schemas.d.ts +0 -1
- package/dist/extensions/tools/team/delegated-agent.d.ts +3 -4
- package/dist/extensions/tools/team/index.d.ts +0 -1
- package/dist/extensions/tools/team/multi-agent.d.ts +1 -2
- package/dist/extensions/tools/team/projections.d.ts +0 -1
- package/dist/extensions/tools/team/runtime.d.ts +0 -1
- package/dist/extensions/tools/team/spawn-agent-tool.d.ts +4 -5
- package/dist/extensions/tools/team/subagent-prompts.d.ts +0 -1
- package/dist/extensions/tools/team/team-tools.d.ts +7 -8
- package/dist/extensions/tools/types.d.ts +11 -12
- package/dist/hooks/checkpoint-hooks.d.ts +9 -2
- package/dist/hooks/hook-extension.d.ts +2 -0
- package/dist/{extensions/config/hooks-config-loader.d.ts → hooks/hook-file-config.d.ts} +1 -2
- package/dist/hooks/hook-file-hooks.d.ts +2 -2
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/subprocess-runner.d.ts +0 -1
- package/dist/hooks/subprocess.d.ts +0 -1
- package/dist/hub/{connect.d.ts → client/connect.d.ts} +1 -2
- package/dist/hub/{client.d.ts → client/index.d.ts} +41 -4
- package/dist/hub/{session-client.d.ts → client/session-client.d.ts} +41 -13
- package/dist/hub/{ui-client.d.ts → client/ui-client.d.ts} +1 -1
- package/dist/hub/daemon/entry.d.ts +1 -0
- package/dist/hub/daemon/entry.js +720 -0
- package/dist/hub/{daemon.d.ts → daemon/index.d.ts} +6 -3
- package/dist/hub/{runtime-handlers.d.ts → daemon/runtime-handlers.d.ts} +3 -2
- package/dist/hub/{start-shared-server.d.ts → daemon/start-shared-server.d.ts} +1 -2
- package/dist/hub/{defaults.d.ts → discovery/defaults.d.ts} +0 -1
- package/dist/hub/{discovery.d.ts → discovery/index.d.ts} +2 -1
- package/dist/hub/{workspace.d.ts → discovery/workspace.d.ts} +1 -2
- package/dist/hub/index.d.ts +28 -11
- package/dist/hub/index.js +484 -1061
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +73 -0
- package/dist/{transports/remote.d.ts → hub/runtime-host/remote-runtime-host.d.ts} +1 -2
- package/dist/hub/{browser-websocket.d.ts → server/browser-websocket.d.ts} +1 -2
- package/dist/hub/{transport.d.ts → server/command-transport.d.ts} +0 -1
- 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 +56 -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 +34 -0
- package/dist/hub/server/hub-session-records.d.ts +8 -0
- package/dist/hub/server/hub-websocket-server.d.ts +6 -0
- package/dist/hub/server/index.d.ts +4 -0
- package/dist/hub/{native-transport.d.ts → server/native-transport.d.ts} +1 -2
- package/dist/index.d.ts +51 -41
- package/dist/index.js +214 -872
- 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/{agent-runtime-config-builder.d.ts → config/agent-runtime-config-builder.d.ts} +12 -21
- package/dist/runtime/host/history.d.ts +18 -0
- package/dist/runtime/{host.d.ts → host/host.d.ts} +3 -4
- package/dist/runtime/host/local/agent-event-bridge.d.ts +29 -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 +118 -0
- package/dist/{transports → runtime/host}/runtime-host-support.d.ts +3 -5
- package/dist/runtime/{runtime-host.d.ts → host/runtime-host.d.ts} +66 -31
- package/dist/runtime/{runtime-builder.d.ts → orchestration/runtime-builder.d.ts} +0 -1
- package/dist/runtime/{runtime-event-adapter.d.ts → orchestration/runtime-event-adapter.d.ts} +0 -1
- package/dist/runtime/{runtime-oauth-token-manager.d.ts → orchestration/runtime-oauth-token-manager.d.ts} +1 -2
- package/dist/runtime/{session-runtime-orchestrator.d.ts → orchestration/session-runtime-orchestrator.d.ts} +20 -63
- package/dist/runtime/{session-runtime.d.ts → orchestration/session-runtime.d.ts} +14 -12
- package/dist/runtime/{user-input-builder.d.ts → orchestration/user-input-builder.d.ts} +2 -11
- package/dist/runtime/{loop-detection.d.ts → safety/loop-detection.d.ts} +0 -1
- package/dist/runtime/{mistake-tracker.d.ts → safety/mistake-tracker.d.ts} +0 -1
- package/dist/runtime/{rules.d.ts → safety/rules.d.ts} +1 -2
- package/dist/runtime/{subprocess-sandbox.d.ts → tools/subprocess-sandbox.d.ts} +15 -1
- package/dist/runtime/{tool-approval.d.ts → tools/tool-approval.d.ts} +0 -1
- package/dist/runtime/turn-queue/pending-prompt-service.d.ts +64 -0
- package/dist/services/agent-events.d.ts +1 -2
- package/dist/services/config.d.ts +0 -1
- package/dist/services/global-settings.d.ts +27 -5
- package/dist/{llms → services/llms}/cline-recommended-models.d.ts +1 -2
- package/dist/{llms → services/llms}/configured-provider-registry.d.ts +0 -1
- package/dist/services/llms/handler-factory.d.ts +3 -0
- package/dist/{llms → services/llms}/provider-defaults.d.ts +2 -1
- package/dist/{llms → services/llms}/provider-settings.d.ts +5 -3
- package/dist/{llms → services/llms}/runtime-config.d.ts +0 -1
- package/dist/{llms → services/llms}/runtime-registry.d.ts +0 -1
- package/dist/{llms → services/llms}/runtime-types.d.ts +0 -1
- package/dist/services/local-runtime-bootstrap.d.ts +7 -9
- package/dist/services/plugin-tools.d.ts +0 -1
- package/dist/services/providers/local-provider-registry.d.ts +9 -10
- package/dist/services/providers/local-provider-service.d.ts +36 -3
- package/dist/services/providers/model-source.d.ts +3 -0
- package/dist/services/session-artifacts.d.ts +0 -1
- package/dist/services/session-data.d.ts +2 -3
- package/dist/services/session-telemetry.d.ts +0 -1
- package/dist/services/storage/file-team-store.d.ts +0 -1
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +0 -1
- package/dist/services/storage/provider-settings-manager.d.ts +3 -4
- package/dist/services/storage/sqlite-session-store.d.ts +0 -1
- package/dist/services/storage/sqlite-team-store.d.ts +0 -1
- package/dist/services/storage/team-store.d.ts +0 -1
- package/dist/services/telemetry/ITelemetryAdapter.d.ts +0 -1
- package/dist/services/telemetry/OpenTelemetryAdapter.d.ts +0 -1
- package/dist/services/telemetry/OpenTelemetryProvider.d.ts +32 -1
- package/dist/services/telemetry/TelemetryLoggerSink.d.ts +0 -1
- package/dist/services/telemetry/TelemetryService.d.ts +0 -1
- package/dist/services/telemetry/core-events.d.ts +46 -3
- package/dist/services/telemetry/distinct-id.d.ts +0 -1
- package/dist/services/telemetry/index.d.ts +1 -2
- package/dist/services/telemetry/index.js +1 -0
- package/dist/services/usage.d.ts +10 -2
- package/dist/services/workspace/file-indexer.d.ts +0 -1
- package/dist/services/workspace/index.d.ts +0 -1
- package/dist/services/workspace/mention-enricher.d.ts +0 -1
- package/dist/{session → services/workspace}/workspace-manager.d.ts +0 -1
- package/dist/services/{workspace-manifest.d.ts → workspace/workspace-manifest.d.ts} +20 -5
- package/dist/services/workspace/workspace-telemetry.d.ts +18 -0
- package/dist/session/checkpoint-restore.d.ts +20 -0
- package/dist/session/{session-graph.d.ts → models/session-graph.d.ts} +2 -3
- package/dist/session/{session-manifest.d.ts → models/session-manifest.d.ts} +0 -1
- package/dist/session/{session-row.d.ts → models/session-row.d.ts} +2 -3
- package/dist/session/{file-session-service.d.ts → services/file-session-service.d.ts} +1 -2
- package/dist/session/{message-builder.d.ts → services/message-builder.d.ts} +7 -16
- package/dist/session/{persistence-service.d.ts → services/persistence-service.d.ts} +10 -11
- package/dist/session/{session-service.d.ts → services/session-service.d.ts} +4 -5
- package/dist/session/session-snapshot.d.ts +57 -0
- package/dist/session/session-versioning-service.d.ts +48 -0
- package/dist/session/{conversation-store.d.ts → stores/conversation-store.d.ts} +0 -1
- package/dist/session/{session-manifest-store.d.ts → stores/session-manifest-store.d.ts} +3 -4
- package/dist/session/{team-persistence-store.d.ts → stores/team-persistence-store.d.ts} +2 -3
- package/dist/session/team/index.d.ts +2 -0
- package/dist/session/{subagent-session-manager.d.ts → team/team-child-session-manager.d.ts} +7 -8
- package/dist/session/{session-team-coordination.d.ts → team/team-session-coordinator.d.ts} +3 -4
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/settings-service.d.ts +6 -0
- package/dist/settings/types.d.ts +42 -0
- package/dist/types/chat-schema.d.ts +24 -7
- package/dist/types/common.d.ts +0 -1
- package/dist/types/config.d.ts +2 -3
- package/dist/types/events.d.ts +8 -1
- package/dist/types/provider-settings.d.ts +2 -3
- package/dist/types/session.d.ts +22 -6
- package/dist/types/sessions.d.ts +0 -1
- package/dist/types/storage.d.ts +0 -1
- package/dist/types.d.ts +17 -14
- package/dist/version.d.ts +0 -1
- package/package.json +16 -12
- package/dist/ClineCore.d.ts.map +0 -1
- package/dist/account/cline-account-service.d.ts.map +0 -1
- package/dist/account/index.d.ts.map +0 -1
- package/dist/account/rpc.d.ts.map +0 -1
- package/dist/account/types.d.ts.map +0 -1
- package/dist/auth/bounded-ttl-cache.d.ts.map +0 -1
- package/dist/auth/client.d.ts.map +0 -1
- package/dist/auth/cline.d.ts.map +0 -1
- package/dist/auth/codex.d.ts.map +0 -1
- package/dist/auth/oca.d.ts.map +0 -1
- package/dist/auth/server.d.ts.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/utils.d.ts.map +0 -1
- package/dist/cron/cron-event-ingress.d.ts.map +0 -1
- package/dist/cron/cron-materializer.d.ts.map +0 -1
- package/dist/cron/cron-reconciler.d.ts.map +0 -1
- package/dist/cron/cron-report-writer.d.ts.map +0 -1
- package/dist/cron/cron-runner.d.ts.map +0 -1
- package/dist/cron/cron-schema.d.ts.map +0 -1
- package/dist/cron/cron-service.d.ts.map +0 -1
- package/dist/cron/cron-spec-parser.d.ts.map +0 -1
- package/dist/cron/cron-watcher.d.ts.map +0 -1
- package/dist/cron/resource-limiter.d.ts.map +0 -1
- package/dist/cron/schedule-command-service.d.ts.map +0 -1
- package/dist/cron/schedule-service.d.ts.map +0 -1
- package/dist/cron/scheduler.d.ts +0 -68
- package/dist/cron/scheduler.d.ts.map +0 -1
- package/dist/cron/sqlite-cron-store.d.ts.map +0 -1
- package/dist/cron/sqlite-schedule-store.d.ts +0 -52
- package/dist/cron/sqlite-schedule-store.d.ts.map +0 -1
- package/dist/extensions/config/agent-config-loader.d.ts +0 -20
- package/dist/extensions/config/agent-config-loader.d.ts.map +0 -1
- package/dist/extensions/config/agent-config-parser.d.ts +0 -29
- package/dist/extensions/config/agent-config-parser.d.ts.map +0 -1
- package/dist/extensions/config/hooks-config-loader.d.ts.map +0 -1
- package/dist/extensions/config/index.d.ts.map +0 -1
- package/dist/extensions/config/runtime-commands.d.ts.map +0 -1
- package/dist/extensions/config/unified-config-file-watcher.d.ts.map +0 -1
- package/dist/extensions/config/user-instruction-config-loader.d.ts.map +0 -1
- package/dist/extensions/context/agentic-compaction.d.ts.map +0 -1
- package/dist/extensions/context/basic-compaction.d.ts.map +0 -1
- package/dist/extensions/context/compaction-shared.d.ts.map +0 -1
- package/dist/extensions/context/compaction.d.ts.map +0 -1
- package/dist/extensions/index.d.ts.map +0 -1
- package/dist/extensions/mcp/client.d.ts.map +0 -1
- package/dist/extensions/mcp/config-loader.d.ts.map +0 -1
- package/dist/extensions/mcp/index.d.ts.map +0 -1
- package/dist/extensions/mcp/manager.d.ts.map +0 -1
- package/dist/extensions/mcp/name-transform.d.ts.map +0 -1
- package/dist/extensions/mcp/policies.d.ts.map +0 -1
- package/dist/extensions/mcp/tools.d.ts.map +0 -1
- package/dist/extensions/mcp/types.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-config-loader.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-load-report.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-loader.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-module-import.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-sandbox.d.ts.map +0 -1
- package/dist/extensions/plugin/plugin-targeting.d.ts.map +0 -1
- package/dist/extensions/tools/constants.d.ts.map +0 -1
- package/dist/extensions/tools/definitions.d.ts.map +0 -1
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts.map +0 -1
- package/dist/extensions/tools/executors/apply-patch.d.ts.map +0 -1
- package/dist/extensions/tools/executors/bash.d.ts.map +0 -1
- package/dist/extensions/tools/executors/editor.d.ts.map +0 -1
- package/dist/extensions/tools/executors/file-read.d.ts.map +0 -1
- package/dist/extensions/tools/executors/index.d.ts.map +0 -1
- package/dist/extensions/tools/executors/search.d.ts.map +0 -1
- package/dist/extensions/tools/executors/web-fetch.d.ts.map +0 -1
- package/dist/extensions/tools/helpers.d.ts.map +0 -1
- package/dist/extensions/tools/index.d.ts.map +0 -1
- package/dist/extensions/tools/model-tool-routing.d.ts.map +0 -1
- package/dist/extensions/tools/presets.d.ts.map +0 -1
- package/dist/extensions/tools/runtime.d.ts.map +0 -1
- package/dist/extensions/tools/schemas.d.ts.map +0 -1
- package/dist/extensions/tools/team/delegated-agent.d.ts.map +0 -1
- package/dist/extensions/tools/team/index.d.ts.map +0 -1
- package/dist/extensions/tools/team/multi-agent.d.ts.map +0 -1
- package/dist/extensions/tools/team/projections.d.ts.map +0 -1
- package/dist/extensions/tools/team/runtime.d.ts.map +0 -1
- package/dist/extensions/tools/team/spawn-agent-tool.d.ts.map +0 -1
- package/dist/extensions/tools/team/subagent-prompts.d.ts.map +0 -1
- package/dist/extensions/tools/team/team-tools.d.ts.map +0 -1
- package/dist/extensions/tools/types.d.ts.map +0 -1
- package/dist/hooks/checkpoint-hooks.d.ts.map +0 -1
- package/dist/hooks/hook-bridge.d.ts +0 -118
- package/dist/hooks/hook-bridge.d.ts.map +0 -1
- package/dist/hooks/hook-file-hooks.d.ts.map +0 -1
- package/dist/hooks/hook-registry.d.ts +0 -16
- package/dist/hooks/hook-registry.d.ts.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/subprocess-runner.d.ts.map +0 -1
- package/dist/hooks/subprocess.d.ts.map +0 -1
- package/dist/hub/browser-websocket.d.ts.map +0 -1
- package/dist/hub/client.d.ts.map +0 -1
- package/dist/hub/connect.d.ts.map +0 -1
- package/dist/hub/daemon-entry.d.ts +0 -2
- package/dist/hub/daemon-entry.d.ts.map +0 -1
- package/dist/hub/daemon-entry.js +0 -1305
- package/dist/hub/daemon.d.ts.map +0 -1
- package/dist/hub/defaults.d.ts.map +0 -1
- package/dist/hub/discovery.d.ts.map +0 -1
- package/dist/hub/index.d.ts.map +0 -1
- package/dist/hub/native-transport.d.ts.map +0 -1
- package/dist/hub/runtime-handlers.d.ts.map +0 -1
- package/dist/hub/server.d.ts +0 -104
- package/dist/hub/server.d.ts.map +0 -1
- package/dist/hub/session-client.d.ts.map +0 -1
- package/dist/hub/start-shared-server.d.ts.map +0 -1
- package/dist/hub/transport.d.ts.map +0 -1
- package/dist/hub/ui-client.d.ts.map +0 -1
- package/dist/hub/workspace.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/llms/cline-recommended-models.d.ts.map +0 -1
- package/dist/llms/configured-provider-registry.d.ts.map +0 -1
- package/dist/llms/handler-factory.d.ts +0 -16
- package/dist/llms/handler-factory.d.ts.map +0 -1
- package/dist/llms/provider-defaults.d.ts.map +0 -1
- package/dist/llms/provider-settings.d.ts.map +0 -1
- package/dist/llms/runtime-config.d.ts.map +0 -1
- package/dist/llms/runtime-registry.d.ts.map +0 -1
- package/dist/llms/runtime-types.d.ts.map +0 -1
- package/dist/runtime/agent-config-adapter.d.ts +0 -148
- package/dist/runtime/agent-config-adapter.d.ts.map +0 -1
- package/dist/runtime/agent-runtime-config-builder.d.ts.map +0 -1
- package/dist/runtime/history.d.ts +0 -10
- package/dist/runtime/history.d.ts.map +0 -1
- package/dist/runtime/host.d.ts.map +0 -1
- package/dist/runtime/loop-detection.d.ts.map +0 -1
- package/dist/runtime/mistake-tracker.d.ts.map +0 -1
- package/dist/runtime/rules.d.ts.map +0 -1
- package/dist/runtime/runtime-builder.d.ts.map +0 -1
- package/dist/runtime/runtime-event-adapter.d.ts.map +0 -1
- package/dist/runtime/runtime-host.d.ts.map +0 -1
- package/dist/runtime/runtime-oauth-token-manager.d.ts.map +0 -1
- package/dist/runtime/session-runtime-orchestrator.d.ts.map +0 -1
- package/dist/runtime/session-runtime.d.ts.map +0 -1
- package/dist/runtime/subprocess-sandbox.d.ts.map +0 -1
- package/dist/runtime/tool-approval.d.ts.map +0 -1
- package/dist/runtime/user-input-builder.d.ts.map +0 -1
- package/dist/services/agent-events.d.ts.map +0 -1
- package/dist/services/config.d.ts.map +0 -1
- package/dist/services/global-settings.d.ts.map +0 -1
- package/dist/services/index.js +0 -28
- package/dist/services/local-runtime-bootstrap.d.ts.map +0 -1
- package/dist/services/plugin-tools.d.ts.map +0 -1
- package/dist/services/providers/local-provider-registry.d.ts.map +0 -1
- package/dist/services/providers/local-provider-service.d.ts.map +0 -1
- package/dist/services/session-artifacts.d.ts.map +0 -1
- package/dist/services/session-data.d.ts.map +0 -1
- package/dist/services/session-telemetry.d.ts.map +0 -1
- package/dist/services/storage/file-team-store.d.ts.map +0 -1
- package/dist/services/storage/provider-settings-legacy-migration.d.ts.map +0 -1
- package/dist/services/storage/provider-settings-manager.d.ts.map +0 -1
- package/dist/services/storage/sqlite-session-store.d.ts.map +0 -1
- package/dist/services/storage/sqlite-team-store.d.ts.map +0 -1
- package/dist/services/storage/team-store.d.ts.map +0 -1
- package/dist/services/telemetry/ITelemetryAdapter.d.ts.map +0 -1
- package/dist/services/telemetry/OpenTelemetryAdapter.d.ts.map +0 -1
- package/dist/services/telemetry/OpenTelemetryProvider.d.ts.map +0 -1
- package/dist/services/telemetry/TelemetryLoggerSink.d.ts.map +0 -1
- package/dist/services/telemetry/TelemetryService.d.ts.map +0 -1
- package/dist/services/telemetry/core-events.d.ts.map +0 -1
- package/dist/services/telemetry/distinct-id.d.ts.map +0 -1
- package/dist/services/telemetry/index.d.ts.map +0 -1
- package/dist/services/usage.d.ts.map +0 -1
- package/dist/services/workspace/file-indexer.d.ts.map +0 -1
- package/dist/services/workspace/index.d.ts.map +0 -1
- package/dist/services/workspace/mention-enricher.d.ts.map +0 -1
- package/dist/services/workspace-manifest.d.ts.map +0 -1
- package/dist/session/conversation-store.d.ts.map +0 -1
- package/dist/session/file-session-service.d.ts.map +0 -1
- package/dist/session/message-builder.d.ts.map +0 -1
- package/dist/session/persistence-service.d.ts.map +0 -1
- package/dist/session/session-graph.d.ts.map +0 -1
- package/dist/session/session-manifest-store.d.ts.map +0 -1
- package/dist/session/session-manifest.d.ts.map +0 -1
- package/dist/session/session-row.d.ts.map +0 -1
- package/dist/session/session-service.d.ts.map +0 -1
- package/dist/session/session-team-coordination.d.ts.map +0 -1
- package/dist/session/subagent-session-manager.d.ts.map +0 -1
- package/dist/session/team-persistence-store.d.ts.map +0 -1
- package/dist/session/workspace-manager.d.ts.map +0 -1
- package/dist/transports/hub.d.ts +0 -58
- package/dist/transports/hub.d.ts.map +0 -1
- package/dist/transports/local.d.ts +0 -119
- package/dist/transports/local.d.ts.map +0 -1
- package/dist/transports/remote.d.ts.map +0 -1
- package/dist/transports/runtime-host-support.d.ts.map +0 -1
- package/dist/types/chat-schema.d.ts.map +0 -1
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/provider-settings.d.ts.map +0 -1
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/sessions.d.ts.map +0 -1
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/src/ClineCore.ts +0 -1026
- package/src/account/cline-account-service.ts +0 -338
- package/src/account/index.ts +0 -24
- package/src/account/rpc.ts +0 -185
- package/src/account/types.ts +0 -108
- package/src/auth/bounded-ttl-cache.ts +0 -53
- package/src/auth/client.ts +0 -46
- package/src/auth/cline.ts +0 -724
- package/src/auth/codex.ts +0 -491
- package/src/auth/oca.ts +0 -588
- package/src/auth/server.ts +0 -265
- package/src/auth/types.ts +0 -110
- package/src/auth/utils.ts +0 -247
- package/src/cron/cron-event-ingress.ts +0 -357
- package/src/cron/cron-materializer.ts +0 -97
- package/src/cron/cron-reconciler.ts +0 -241
- package/src/cron/cron-report-writer.ts +0 -153
- package/src/cron/cron-runner.ts +0 -495
- package/src/cron/cron-schema.ts +0 -127
- package/src/cron/cron-service.ts +0 -163
- package/src/cron/cron-spec-parser.ts +0 -489
- package/src/cron/cron-watcher.ts +0 -102
- package/src/cron/index.ts +0 -15
- package/src/cron/resource-limiter.ts +0 -46
- package/src/cron/schedule-command-service.ts +0 -193
- package/src/cron/schedule-service.ts +0 -703
- package/src/cron/scheduler.ts +0 -772
- package/src/cron/sqlite-cron-store.ts +0 -1286
- package/src/cron/sqlite-schedule-store.ts +0 -708
- package/src/extensions/config/agent-config-loader.ts +0 -114
- package/src/extensions/config/agent-config-parser.ts +0 -198
- package/src/extensions/config/hooks-config-loader.ts +0 -117
- package/src/extensions/config/index.ts +0 -77
- package/src/extensions/config/runtime-commands.ts +0 -82
- package/src/extensions/config/unified-config-file-watcher.ts +0 -496
- package/src/extensions/config/user-instruction-config-loader.ts +0 -549
- package/src/extensions/context/agentic-compaction.ts +0 -131
- package/src/extensions/context/basic-compaction.ts +0 -300
- package/src/extensions/context/compaction-shared.ts +0 -459
- package/src/extensions/context/compaction.ts +0 -226
- package/src/extensions/index.ts +0 -18
- package/src/extensions/mcp/client.ts +0 -420
- package/src/extensions/mcp/config-loader.ts +0 -219
- package/src/extensions/mcp/index.ts +0 -42
- package/src/extensions/mcp/manager.ts +0 -260
- package/src/extensions/mcp/name-transform.ts +0 -33
- package/src/extensions/mcp/policies.ts +0 -47
- package/src/extensions/mcp/tools.ts +0 -47
- package/src/extensions/mcp/types.ts +0 -116
- package/src/extensions/plugin/plugin-config-loader.ts +0 -140
- package/src/extensions/plugin/plugin-load-report.ts +0 -20
- package/src/extensions/plugin/plugin-loader.ts +0 -220
- package/src/extensions/plugin/plugin-module-import.ts +0 -276
- package/src/extensions/plugin/plugin-sandbox-bootstrap.ts +0 -662
- package/src/extensions/plugin/plugin-sandbox.ts +0 -586
- package/src/extensions/plugin/plugin-targeting.ts +0 -32
- package/src/extensions/tools/constants.ts +0 -37
- package/src/extensions/tools/definitions.ts +0 -738
- package/src/extensions/tools/executors/apply-patch-parser.ts +0 -520
- package/src/extensions/tools/executors/apply-patch.ts +0 -348
- package/src/extensions/tools/executors/bash.ts +0 -207
- package/src/extensions/tools/executors/editor.ts +0 -220
- package/src/extensions/tools/executors/file-read.ts +0 -135
- package/src/extensions/tools/executors/index.ts +0 -87
- package/src/extensions/tools/executors/search.ts +0 -470
- package/src/extensions/tools/executors/web-fetch.ts +0 -259
- package/src/extensions/tools/helpers.ts +0 -154
- package/src/extensions/tools/index.ts +0 -183
- package/src/extensions/tools/model-tool-routing.ts +0 -134
- package/src/extensions/tools/presets.ts +0 -190
- package/src/extensions/tools/runtime.ts +0 -261
- package/src/extensions/tools/schemas.ts +0 -343
- package/src/extensions/tools/team/delegated-agent.ts +0 -136
- package/src/extensions/tools/team/index.ts +0 -5
- package/src/extensions/tools/team/multi-agent.ts +0 -1845
- package/src/extensions/tools/team/projections.ts +0 -283
- package/src/extensions/tools/team/runtime.ts +0 -54
- package/src/extensions/tools/team/spawn-agent-tool.ts +0 -201
- package/src/extensions/tools/team/subagent-prompts.ts +0 -41
- package/src/extensions/tools/team/team-tools.ts +0 -902
- package/src/extensions/tools/types.ts +0 -354
- package/src/hooks/checkpoint-hooks.ts +0 -238
- package/src/hooks/hook-bridge.ts +0 -489
- package/src/hooks/hook-file-hooks.ts +0 -934
- package/src/hooks/hook-registry.ts +0 -257
- package/src/hooks/index.ts +0 -18
- package/src/hooks/subprocess-runner.ts +0 -196
- package/src/hooks/subprocess.ts +0 -469
- package/src/hub/browser-websocket.ts +0 -159
- package/src/hub/client.ts +0 -633
- package/src/hub/connect.ts +0 -156
- package/src/hub/daemon-entry.ts +0 -122
- package/src/hub/daemon.ts +0 -284
- package/src/hub/defaults.ts +0 -70
- package/src/hub/discovery.ts +0 -247
- package/src/hub/index.ts +0 -14
- package/src/hub/native-transport.ts +0 -31
- package/src/hub/runtime-handlers.ts +0 -141
- package/src/hub/server.ts +0 -2317
- package/src/hub/session-client.ts +0 -502
- package/src/hub/start-shared-server.ts +0 -61
- package/src/hub/transport.ts +0 -14
- package/src/hub/ui-client.ts +0 -126
- package/src/hub/workspace.ts +0 -19
- package/src/index.ts +0 -688
- package/src/llms/cline-recommended-models.ts +0 -167
- package/src/llms/configured-provider-registry.ts +0 -193
- package/src/llms/handler-factory.ts +0 -56
- package/src/llms/provider-defaults.ts +0 -653
- package/src/llms/provider-settings.ts +0 -310
- package/src/llms/runtime-config.ts +0 -43
- package/src/llms/runtime-registry.ts +0 -172
- package/src/llms/runtime-types.ts +0 -121
- package/src/runtime/agent-config-adapter.ts +0 -636
- package/src/runtime/agent-runtime-config-builder.ts +0 -205
- package/src/runtime/error-feedback.ts +0 -142
- package/src/runtime/history.ts +0 -374
- package/src/runtime/host.ts +0 -222
- package/src/runtime/index.ts +0 -23
- package/src/runtime/loop-detection.ts +0 -162
- package/src/runtime/mistake-tracker.ts +0 -221
- package/src/runtime/rules.ts +0 -49
- package/src/runtime/runtime-builder.ts +0 -814
- package/src/runtime/runtime-event-adapter.ts +0 -412
- package/src/runtime/runtime-host.ts +0 -250
- package/src/runtime/runtime-oauth-token-manager.ts +0 -268
- package/src/runtime/session-runtime-orchestrator.ts +0 -1253
- package/src/runtime/session-runtime.ts +0 -69
- package/src/runtime/subprocess-sandbox.ts +0 -255
- package/src/runtime/tool-approval.ts +0 -102
- package/src/runtime/user-input-builder.ts +0 -167
- package/src/services/agent-events.ts +0 -256
- package/src/services/config.ts +0 -5
- package/src/services/global-settings.ts +0 -122
- package/src/services/local-runtime-bootstrap.ts +0 -424
- package/src/services/plugin-tools.ts +0 -86
- package/src/services/providers/local-provider-registry.ts +0 -456
- package/src/services/providers/local-provider-service.ts +0 -772
- package/src/services/session-artifacts.ts +0 -138
- package/src/services/session-data.ts +0 -398
- package/src/services/session-telemetry.ts +0 -89
- package/src/services/storage/artifact-store.ts +0 -1
- package/src/services/storage/file-team-store.ts +0 -250
- package/src/services/storage/index.ts +0 -11
- package/src/services/storage/provider-settings-legacy-migration.ts +0 -789
- package/src/services/storage/provider-settings-manager.ts +0 -167
- package/src/services/storage/session-store.ts +0 -1
- package/src/services/storage/sqlite-session-store.ts +0 -270
- package/src/services/storage/sqlite-team-store.ts +0 -537
- package/src/services/storage/team-store.ts +0 -36
- package/src/services/telemetry/ITelemetryAdapter.ts +0 -94
- package/src/services/telemetry/OpenTelemetryAdapter.ts +0 -348
- package/src/services/telemetry/OpenTelemetryProvider.ts +0 -415
- package/src/services/telemetry/TelemetryLoggerSink.ts +0 -121
- package/src/services/telemetry/TelemetryService.ts +0 -139
- package/src/services/telemetry/core-events.ts +0 -400
- package/src/services/telemetry/distinct-id.ts +0 -58
- package/src/services/telemetry/index.ts +0 -20
- package/src/services/usage.ts +0 -32
- package/src/services/workspace/file-indexer.ts +0 -351
- package/src/services/workspace/index.ts +0 -7
- package/src/services/workspace/mention-enricher.ts +0 -122
- package/src/services/workspace-manifest.ts +0 -72
- package/src/session/conversation-store.ts +0 -77
- package/src/session/file-session-service.ts +0 -282
- package/src/session/index.ts +0 -32
- package/src/session/message-builder.ts +0 -941
- package/src/session/persistence-service.ts +0 -559
- package/src/session/session-graph.ts +0 -92
- package/src/session/session-manifest-store.ts +0 -158
- package/src/session/session-manifest.ts +0 -29
- package/src/session/session-row.ts +0 -199
- package/src/session/session-service.ts +0 -324
- package/src/session/session-team-coordination.ts +0 -240
- package/src/session/subagent-session-manager.ts +0 -397
- package/src/session/team-persistence-store.ts +0 -176
- package/src/session/workspace-manager.ts +0 -100
- package/src/transports/hub.ts +0 -1081
- package/src/transports/local.ts +0 -1826
- package/src/transports/remote.ts +0 -27
- package/src/transports/runtime-host-support.ts +0 -140
- package/src/types/chat-schema.ts +0 -81
- package/src/types/common.ts +0 -26
- package/src/types/config.ts +0 -220
- package/src/types/events.ts +0 -80
- package/src/types/index.ts +0 -26
- package/src/types/provider-settings.ts +0 -54
- package/src/types/session.ts +0 -111
- package/src/types/sessions.ts +0 -37
- package/src/types/storage.ts +0 -56
- package/src/types.ts +0 -167
- package/src/version.ts +0 -3
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import type { CoreAgentMode } from "../../types/config";
|
|
2
|
-
import {
|
|
3
|
-
DEFAULT_MODEL_TOOL_ROUTING_RULES,
|
|
4
|
-
resolveToolRoutingConfig,
|
|
5
|
-
} from "./model-tool-routing";
|
|
6
|
-
import { resolveToolPresetName, ToolPresets } from "./presets";
|
|
7
|
-
import { createSpawnAgentTool } from "./team/spawn-agent-tool";
|
|
8
|
-
import { TEAM_TOOL_NAMES } from "./team/team-tools";
|
|
9
|
-
import type { DefaultToolsConfig } from "./types";
|
|
10
|
-
|
|
11
|
-
export interface ToolCatalogEntry {
|
|
12
|
-
id: string;
|
|
13
|
-
description: string;
|
|
14
|
-
defaultEnabled: boolean;
|
|
15
|
-
headlessToolNames: string[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface BuiltinToolAvailabilityContext {
|
|
19
|
-
mode?: CoreAgentMode;
|
|
20
|
-
providerId?: string;
|
|
21
|
-
modelId?: string;
|
|
22
|
-
enableSpawnAgent?: boolean;
|
|
23
|
-
enableAgentTeams?: boolean;
|
|
24
|
-
disabledToolIds?: ReadonlySet<string>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
type RuntimeToolCatalogEntry = Omit<ToolCatalogEntry, "defaultEnabled">;
|
|
28
|
-
|
|
29
|
-
const BASE_TOOL_CATALOG: readonly RuntimeToolCatalogEntry[] = [
|
|
30
|
-
{
|
|
31
|
-
id: "read_files",
|
|
32
|
-
description:
|
|
33
|
-
"Read the full content of text or image files at the provided absolute paths, or return only an inclusive one-based line range when start_line/end_line are provided.",
|
|
34
|
-
headlessToolNames: ["read_files"],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "search_codebase",
|
|
38
|
-
description:
|
|
39
|
-
"Perform regex pattern searches across the codebase for code patterns, definitions, imports, and other text matches.",
|
|
40
|
-
headlessToolNames: ["search_codebase"],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "run_commands",
|
|
44
|
-
description:
|
|
45
|
-
"Run shell commands from the root of the workspace for listing files, checking git status, builds, tests, and similar tasks.",
|
|
46
|
-
headlessToolNames: ["run_commands"],
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "editor",
|
|
50
|
-
description:
|
|
51
|
-
"Make controlled filesystem edits on text files with create, replace, and insert operations.",
|
|
52
|
-
headlessToolNames: ["editor"],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "fetch_web_content",
|
|
56
|
-
description:
|
|
57
|
-
"Fetch URL content and analyze it with a prompt describing what to extract.",
|
|
58
|
-
headlessToolNames: ["fetch_web_content"],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "skills",
|
|
62
|
-
description:
|
|
63
|
-
"Execute a configured skill within the main conversation when a matching skill exists for the task.",
|
|
64
|
-
headlessToolNames: ["skills"],
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "ask_question",
|
|
68
|
-
description:
|
|
69
|
-
"Ask the user a single clarifying question with 2-5 selectable options.",
|
|
70
|
-
headlessToolNames: ["ask_question"],
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: "spawn_agent",
|
|
74
|
-
description: createSpawnAgentTool({ configProvider: {} as never })
|
|
75
|
-
.description,
|
|
76
|
-
headlessToolNames: ["spawn_agent"],
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: "teams",
|
|
80
|
-
description:
|
|
81
|
-
"Enable team collaboration tools for teammate management, task coordination, mailbox messaging, mission logs, and outcomes.",
|
|
82
|
-
headlessToolNames: [...TEAM_TOOL_NAMES],
|
|
83
|
-
},
|
|
84
|
-
] as const;
|
|
85
|
-
|
|
86
|
-
const TOOL_NAME_TO_FLAG: Partial<
|
|
87
|
-
Record<
|
|
88
|
-
string,
|
|
89
|
-
keyof Pick<
|
|
90
|
-
DefaultToolsConfig,
|
|
91
|
-
| "enableReadFiles"
|
|
92
|
-
| "enableSearch"
|
|
93
|
-
| "enableBash"
|
|
94
|
-
| "enableWebFetch"
|
|
95
|
-
| "enableApplyPatch"
|
|
96
|
-
| "enableEditor"
|
|
97
|
-
| "enableSkills"
|
|
98
|
-
| "enableAskQuestion"
|
|
99
|
-
| "enableSubmitAndExit"
|
|
100
|
-
>
|
|
101
|
-
>
|
|
102
|
-
> = {
|
|
103
|
-
read_files: "enableReadFiles",
|
|
104
|
-
search_codebase: "enableSearch",
|
|
105
|
-
run_commands: "enableBash",
|
|
106
|
-
fetch_web_content: "enableWebFetch",
|
|
107
|
-
apply_patch: "enableApplyPatch",
|
|
108
|
-
editor: "enableEditor",
|
|
109
|
-
skills: "enableSkills",
|
|
110
|
-
ask_question: "enableAskQuestion",
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
function resolveContextMode(
|
|
114
|
-
mode?: BuiltinToolAvailabilityContext["mode"],
|
|
115
|
-
): CoreAgentMode {
|
|
116
|
-
return mode === "plan" || mode === "yolo" ? mode : "act";
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
type ResolvedToolFlags = Pick<
|
|
120
|
-
DefaultToolsConfig,
|
|
121
|
-
| "enableReadFiles"
|
|
122
|
-
| "enableSearch"
|
|
123
|
-
| "enableBash"
|
|
124
|
-
| "enableWebFetch"
|
|
125
|
-
| "enableApplyPatch"
|
|
126
|
-
| "enableEditor"
|
|
127
|
-
| "enableSkills"
|
|
128
|
-
| "enableAskQuestion"
|
|
129
|
-
| "enableSubmitAndExit"
|
|
130
|
-
> & {
|
|
131
|
-
enableSpawnAgent?: boolean;
|
|
132
|
-
enableAgentTeams?: boolean;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
function resolvePresetFlags(context: BuiltinToolAvailabilityContext): {
|
|
136
|
-
mode: CoreAgentMode;
|
|
137
|
-
flags: ResolvedToolFlags;
|
|
138
|
-
} {
|
|
139
|
-
const mode = resolveContextMode(context.mode);
|
|
140
|
-
const preset = ToolPresets[resolveToolPresetName({ mode })];
|
|
141
|
-
const routed = resolveToolRoutingConfig(
|
|
142
|
-
context.providerId ?? "",
|
|
143
|
-
context.modelId ?? "",
|
|
144
|
-
mode,
|
|
145
|
-
DEFAULT_MODEL_TOOL_ROUTING_RULES,
|
|
146
|
-
);
|
|
147
|
-
return {
|
|
148
|
-
mode,
|
|
149
|
-
flags: {
|
|
150
|
-
...preset,
|
|
151
|
-
...routed,
|
|
152
|
-
...(typeof context.enableSpawnAgent === "boolean"
|
|
153
|
-
? { enableSpawnAgent: context.enableSpawnAgent }
|
|
154
|
-
: {}),
|
|
155
|
-
...(typeof context.enableAgentTeams === "boolean"
|
|
156
|
-
? { enableAgentTeams: context.enableAgentTeams }
|
|
157
|
-
: {}),
|
|
158
|
-
},
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function isEntryEnabledByDefault(
|
|
163
|
-
entryId: string,
|
|
164
|
-
context: BuiltinToolAvailabilityContext,
|
|
165
|
-
): boolean {
|
|
166
|
-
if (context.disabledToolIds?.has(entryId)) {
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const { flags } = resolvePresetFlags(context);
|
|
171
|
-
if (entryId === "spawn_agent") {
|
|
172
|
-
return flags.enableSpawnAgent === true;
|
|
173
|
-
}
|
|
174
|
-
if (entryId === "teams") {
|
|
175
|
-
return flags.enableAgentTeams === true;
|
|
176
|
-
}
|
|
177
|
-
if (entryId === "editor") {
|
|
178
|
-
return flags.enableEditor === true || flags.enableApplyPatch === true;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const flag = TOOL_NAME_TO_FLAG[entryId];
|
|
182
|
-
return flag ? flags[flag] === true : false;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function buildCatalogEntry(
|
|
186
|
-
entry: RuntimeToolCatalogEntry,
|
|
187
|
-
context: BuiltinToolAvailabilityContext,
|
|
188
|
-
): ToolCatalogEntry {
|
|
189
|
-
if (entry.id === "editor") {
|
|
190
|
-
const { flags } = resolvePresetFlags(context);
|
|
191
|
-
const usesApplyPatch =
|
|
192
|
-
flags.enableApplyPatch === true && flags.enableEditor !== true;
|
|
193
|
-
return {
|
|
194
|
-
...entry,
|
|
195
|
-
defaultEnabled: isEntryEnabledByDefault(entry.id, context),
|
|
196
|
-
headlessToolNames: [usesApplyPatch ? "apply_patch" : "editor"],
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return {
|
|
201
|
-
...entry,
|
|
202
|
-
defaultEnabled: isEntryEnabledByDefault(entry.id, context),
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export function getCoreBuiltinToolCatalog(
|
|
207
|
-
context: BuiltinToolAvailabilityContext = {},
|
|
208
|
-
): ToolCatalogEntry[] {
|
|
209
|
-
return BASE_TOOL_CATALOG.map((entry) => buildCatalogEntry(entry, context));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export function getCoreDefaultEnabledToolIds(
|
|
213
|
-
context: BuiltinToolAvailabilityContext = {},
|
|
214
|
-
): string[] {
|
|
215
|
-
return getCoreBuiltinToolCatalog(context)
|
|
216
|
-
.filter((entry) => entry.defaultEnabled)
|
|
217
|
-
.map((entry) => entry.id);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export function resolveCoreSelectedToolIds(input: {
|
|
221
|
-
enabled: boolean;
|
|
222
|
-
allowlist?: string[];
|
|
223
|
-
availabilityContext?: BuiltinToolAvailabilityContext;
|
|
224
|
-
}): Set<string> {
|
|
225
|
-
if (!input.enabled) {
|
|
226
|
-
return new Set();
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const catalog = getCoreBuiltinToolCatalog(input.availabilityContext);
|
|
230
|
-
const known = new Set(catalog.map((entry) => entry.id));
|
|
231
|
-
if (!input.allowlist || input.allowlist.length === 0) {
|
|
232
|
-
return new Set(
|
|
233
|
-
catalog.filter((entry) => entry.defaultEnabled).map((entry) => entry.id),
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
for (const id of input.allowlist) {
|
|
238
|
-
if (!known.has(id)) {
|
|
239
|
-
throw new Error(
|
|
240
|
-
`Unknown tool "${id}". Available tools: ${catalog.map((entry) => entry.id).join(", ")}`,
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
return new Set(input.allowlist);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export function getCoreHeadlessToolNames(
|
|
248
|
-
selectedToolIds: ReadonlySet<string>,
|
|
249
|
-
context: BuiltinToolAvailabilityContext = {},
|
|
250
|
-
): string[] {
|
|
251
|
-
return getCoreBuiltinToolCatalog(context)
|
|
252
|
-
.filter((entry) => selectedToolIds.has(entry.id))
|
|
253
|
-
.flatMap((entry) => entry.headlessToolNames);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export function getCoreAcpToolNames(
|
|
257
|
-
selectedToolIds: ReadonlySet<string>,
|
|
258
|
-
context: BuiltinToolAvailabilityContext = {},
|
|
259
|
-
): string[] {
|
|
260
|
-
return getCoreHeadlessToolNames(selectedToolIds, context);
|
|
261
|
-
}
|
|
@@ -1,343 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
|
|
10
|
-
export const INPUT_ARG_CHAR_LIMIT = 6000;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Schema for read tool input
|
|
14
|
-
*/
|
|
15
|
-
const AbsolutePath = z
|
|
16
|
-
.string()
|
|
17
|
-
.describe("The absolute file path of a text file to read content from");
|
|
18
|
-
|
|
19
|
-
export const ReadFileLineRangeSchema = z
|
|
20
|
-
.object({
|
|
21
|
-
start_line: z
|
|
22
|
-
.number()
|
|
23
|
-
.int()
|
|
24
|
-
.positive()
|
|
25
|
-
.nullable()
|
|
26
|
-
.optional()
|
|
27
|
-
.describe(
|
|
28
|
-
"Optional one-based starting line number to read from; use null or omit for the start of the file",
|
|
29
|
-
),
|
|
30
|
-
end_line: z
|
|
31
|
-
.number()
|
|
32
|
-
.int()
|
|
33
|
-
.positive()
|
|
34
|
-
.nullable()
|
|
35
|
-
.optional()
|
|
36
|
-
.describe(
|
|
37
|
-
"Optional one-based ending line number to read through; use null or omit for the end of the file",
|
|
38
|
-
),
|
|
39
|
-
})
|
|
40
|
-
.describe("Optional inclusive one-based file line range");
|
|
41
|
-
|
|
42
|
-
export const ReadFileRequestSchema = z
|
|
43
|
-
.object({
|
|
44
|
-
path: AbsolutePath,
|
|
45
|
-
start_line: ReadFileLineRangeSchema.shape.start_line,
|
|
46
|
-
end_line: ReadFileLineRangeSchema.shape.end_line,
|
|
47
|
-
})
|
|
48
|
-
.describe(
|
|
49
|
-
"A file read request with optional inclusive one-based line bounds",
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Schema for read_files tool input
|
|
54
|
-
*/
|
|
55
|
-
export const ReadFilesInputSchema = z.object({
|
|
56
|
-
files: z
|
|
57
|
-
.array(ReadFileRequestSchema)
|
|
58
|
-
.describe(
|
|
59
|
-
"Array of file read requests. Omit start_line/end_line or set them to null to return the full file content boundaries; provide integers to return only that inclusive one-based line range. Prefer this tool over running terminal command to get file content for better performance and reliability.",
|
|
60
|
-
),
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Union schema for read_files tool input, allowing either a single string, an array of strings, or the full object schema
|
|
65
|
-
*/
|
|
66
|
-
export const ReadFilesInputUnionSchema = z.union([
|
|
67
|
-
ReadFilesInputSchema,
|
|
68
|
-
ReadFileRequestSchema,
|
|
69
|
-
z.array(ReadFileRequestSchema),
|
|
70
|
-
z.array(z.string()),
|
|
71
|
-
z.string(),
|
|
72
|
-
z.object({ files: ReadFileRequestSchema }),
|
|
73
|
-
z.object({ file_paths: z.array(AbsolutePath) }),
|
|
74
|
-
z.object({ file_paths: z.string() }),
|
|
75
|
-
z.object({ paths: z.array(z.union([AbsolutePath, ReadFileRequestSchema])) }),
|
|
76
|
-
z.object({ paths: ReadFileRequestSchema }),
|
|
77
|
-
z.object({ paths: z.string() }),
|
|
78
|
-
]);
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Schema for search_codebase tool input
|
|
82
|
-
*/
|
|
83
|
-
export const SearchCodebaseInputSchema = z.object({
|
|
84
|
-
queries: z
|
|
85
|
-
.array(z.string())
|
|
86
|
-
.describe("Array of regex search queries to execute"),
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Union schema for search_codebase tool input, allowing either a single string, an array of strings, or the full object schema
|
|
91
|
-
*/
|
|
92
|
-
export const SearchCodebaseUnionInputSchema = z.union([
|
|
93
|
-
SearchCodebaseInputSchema,
|
|
94
|
-
z.array(z.string()),
|
|
95
|
-
z.string(),
|
|
96
|
-
z.object({ queries: z.string() }),
|
|
97
|
-
]);
|
|
98
|
-
|
|
99
|
-
const CommandInputSchema = z
|
|
100
|
-
.string()
|
|
101
|
-
.describe(
|
|
102
|
-
`The non-interactive shell command to execute - MUST keep input short and concise (within ${INPUT_ARG_CHAR_LIMIT * 2} characters) to avoid timeouts.`,
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Schema for run_commands tool input
|
|
107
|
-
*/
|
|
108
|
-
export const RunCommandsInputSchema = z.object({
|
|
109
|
-
commands: z
|
|
110
|
-
.array(CommandInputSchema)
|
|
111
|
-
.describe("Array of shell commands to execute"),
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Union schema for run_commands tool input. More flexible.
|
|
116
|
-
*/
|
|
117
|
-
export const RunCommandsInputUnionSchema = z.union([
|
|
118
|
-
RunCommandsInputSchema,
|
|
119
|
-
z.object({ commands: CommandInputSchema }),
|
|
120
|
-
z.object({ command: CommandInputSchema }),
|
|
121
|
-
z.object({ cmd: CommandInputSchema }),
|
|
122
|
-
z.array(z.string()),
|
|
123
|
-
z.string(),
|
|
124
|
-
]);
|
|
125
|
-
|
|
126
|
-
export const StructuredCommandInputSchema = z.object({
|
|
127
|
-
command: z
|
|
128
|
-
.string()
|
|
129
|
-
.min(1)
|
|
130
|
-
.describe("The executable to run directly without shell parsing."),
|
|
131
|
-
args: z
|
|
132
|
-
.array(z.string())
|
|
133
|
-
.optional()
|
|
134
|
-
.describe("Optional argv list passed directly to the executable."),
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
export const StructuredCommandEntrySchema = z.union([
|
|
138
|
-
CommandInputSchema,
|
|
139
|
-
StructuredCommandInputSchema,
|
|
140
|
-
]);
|
|
141
|
-
/**
|
|
142
|
-
* Schema for run_commands tool input
|
|
143
|
-
*/
|
|
144
|
-
export const StructuredCommandsInputSchema = z.object({
|
|
145
|
-
commands: z
|
|
146
|
-
.array(StructuredCommandEntrySchema)
|
|
147
|
-
.describe(
|
|
148
|
-
"Array of commands to execute. Prefer structured { command, args } entries for portability; plain strings are still supported and are interpreted by the active shell.",
|
|
149
|
-
),
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Union schema for run_commands tool input. More flexible.
|
|
154
|
-
*/
|
|
155
|
-
export const StructuredCommandsInputUnionSchema = z.union([
|
|
156
|
-
RunCommandsInputSchema,
|
|
157
|
-
StructuredCommandsInputSchema,
|
|
158
|
-
z.object({ commands: StructuredCommandEntrySchema }),
|
|
159
|
-
z.array(StructuredCommandInputSchema),
|
|
160
|
-
StructuredCommandInputSchema,
|
|
161
|
-
z.object({ command: CommandInputSchema }),
|
|
162
|
-
z.object({ cmd: CommandInputSchema }),
|
|
163
|
-
z.array(z.string()),
|
|
164
|
-
z.string(),
|
|
165
|
-
]);
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Schema for a single web fetch request
|
|
169
|
-
*/
|
|
170
|
-
export const WebFetchRequestSchema = z.object({
|
|
171
|
-
url: z.string().describe("The URL to fetch"),
|
|
172
|
-
prompt: z.string().min(2).describe("Analysis prompt for the fetched content"),
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Schema for fetch_web_content tool input
|
|
177
|
-
*/
|
|
178
|
-
export const FetchWebContentInputSchema = z.object({
|
|
179
|
-
requests: z
|
|
180
|
-
.array(WebFetchRequestSchema)
|
|
181
|
-
.describe("Array of the URLs for the web fetch requests"),
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Schema for editor tool input
|
|
186
|
-
*/
|
|
187
|
-
export const EditFileInputSchema = z
|
|
188
|
-
.object({
|
|
189
|
-
path: z
|
|
190
|
-
.string()
|
|
191
|
-
.min(1)
|
|
192
|
-
.describe("The absolute file path for the action to be performed on"),
|
|
193
|
-
old_text: z
|
|
194
|
-
.string()
|
|
195
|
-
.nullable()
|
|
196
|
-
.optional()
|
|
197
|
-
.describe(
|
|
198
|
-
`Exact text to replace (must match exactly once). Omit this when creating a missing file or inserting via insert_line. Keep this at or below ${INPUT_ARG_CHAR_LIMIT} characters when possible; larger payloads should be split across multiple tool calls to avoid timeouts.`,
|
|
199
|
-
),
|
|
200
|
-
new_text: z
|
|
201
|
-
.string()
|
|
202
|
-
.describe(
|
|
203
|
-
`The new content to write when creating a missing file, the replacement text for edits, or the inserted text when insert_line is provided. Keep this at or below ${INPUT_ARG_CHAR_LIMIT} characters when possible; for large edits, use multiple calls with small chunks of old_text and new_text to iteratively edit the file.`,
|
|
204
|
-
),
|
|
205
|
-
insert_line: z
|
|
206
|
-
.number()
|
|
207
|
-
.int()
|
|
208
|
-
.nullable()
|
|
209
|
-
.optional()
|
|
210
|
-
.describe(
|
|
211
|
-
"Optional positive one-based boundary line. When provided, the tool inserts new_text before that line instead of performing a replacement edit; use line_count + 1 to append at EOF.",
|
|
212
|
-
),
|
|
213
|
-
})
|
|
214
|
-
.describe(
|
|
215
|
-
"Edit a text file by replacing old_text with new_text, create the file with new_text if it does not exist, or insert new_text at insert_line when insert_line is provided. Prefer using this tool for file edits over shell commands. IMPORTANT: large edits can time out, so use small chunks and multiple calls when possible.",
|
|
216
|
-
);
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Schema for apply_patch tool input
|
|
220
|
-
*/
|
|
221
|
-
export const ApplyPatchInputSchema = z
|
|
222
|
-
.object({
|
|
223
|
-
input: z
|
|
224
|
-
.string()
|
|
225
|
-
.min(1)
|
|
226
|
-
.describe(
|
|
227
|
-
"The freeform apply_patch payload in the canonical patch grammar (e.g *** Begin Patch, *** Update File:, @@, and *** End Patch).",
|
|
228
|
-
),
|
|
229
|
-
})
|
|
230
|
-
.describe(
|
|
231
|
-
"Modify or create a text file by applying patches using the canonical apply_patch diff grammar. Prefer sending the patch body directly rather than wrapping it in shell syntax. IMPORTANT: large patches can time out, so use small chunks and multiple calls when possible.",
|
|
232
|
-
);
|
|
233
|
-
export const ApplyPatchInputUnionSchema = z.union([
|
|
234
|
-
ApplyPatchInputSchema,
|
|
235
|
-
z.string(),
|
|
236
|
-
]);
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Schema for skills tool input
|
|
240
|
-
*/
|
|
241
|
-
export const SkillsInputSchema = z.object({
|
|
242
|
-
skill: z.string().min(1).describe("Name of the skill to execute."),
|
|
243
|
-
args: z
|
|
244
|
-
.string()
|
|
245
|
-
.nullable()
|
|
246
|
-
.optional()
|
|
247
|
-
.describe("Arguments for the skill; use null when omitted"),
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Schema for ask_followup_question tool input
|
|
252
|
-
*/
|
|
253
|
-
export const AskQuestionInputSchema = z.object({
|
|
254
|
-
question: z
|
|
255
|
-
.string()
|
|
256
|
-
.min(1)
|
|
257
|
-
.describe(
|
|
258
|
-
'The single question to ask the user. E.g. "How can I help you?"',
|
|
259
|
-
),
|
|
260
|
-
options: z
|
|
261
|
-
.array(z.string().min(1))
|
|
262
|
-
.min(2)
|
|
263
|
-
.max(5)
|
|
264
|
-
.describe(
|
|
265
|
-
"Array of 2-5 user-selectable answer options for the single question",
|
|
266
|
-
),
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
export const SubmitInputSchema = z.object({
|
|
270
|
-
summary: z
|
|
271
|
-
.string()
|
|
272
|
-
.min(10)
|
|
273
|
-
.describe(
|
|
274
|
-
"Summarization of the investigation, steps taken, and resolution status to submit at the end of the session. Before submitting, read the problem again along with any provided test's assertions carefully and confirm your fix produces the expected output.",
|
|
275
|
-
),
|
|
276
|
-
verified: z
|
|
277
|
-
.boolean()
|
|
278
|
-
.describe(
|
|
279
|
-
`Have you verified that the issue is resolved to the best of your knowledge, including updating and creating all the requested files and items? 'True' if you have completed the investigation and taken all necessary steps to resolve the issue.\n'False' if you have done all you can but cannot resolve the issue or if you are stuck and cannot proceed further. =\nIMPORTANT: You must run the specific failing test(s) mentioned in the issue or test patch and include the test output in your reasoning. If the test still fails after your fix, you must revise. Do NOT submit with 'true' unless the test output shows the test passing.`,
|
|
280
|
-
),
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
// =============================================================================
|
|
284
|
-
// Type Definitions (derived from Zod schemas)
|
|
285
|
-
// =============================================================================
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Input for a single file read request
|
|
289
|
-
*/
|
|
290
|
-
export type ReadFileRequest = z.infer<typeof ReadFileRequestSchema>;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Input for the read_files tool
|
|
294
|
-
*/
|
|
295
|
-
export type ReadFilesInput = z.infer<typeof ReadFilesInputSchema>;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Input for the search_codebase tool
|
|
299
|
-
*/
|
|
300
|
-
export type SearchCodebaseInput = z.infer<typeof SearchCodebaseInputSchema>;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Input for the run_commands tool
|
|
304
|
-
*/
|
|
305
|
-
export type RunCommandsInput = z.infer<typeof RunCommandsInputSchema>;
|
|
306
|
-
export type StructuredCommandInput = z.infer<
|
|
307
|
-
typeof StructuredCommandInputSchema
|
|
308
|
-
>;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Web fetch request parameters
|
|
312
|
-
*/
|
|
313
|
-
export type WebFetchRequest = z.infer<typeof WebFetchRequestSchema>;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Input for the fetch_web_content tool
|
|
317
|
-
*/
|
|
318
|
-
export type FetchWebContentInput = z.infer<typeof FetchWebContentInputSchema>;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Input for the editor tool
|
|
322
|
-
*/
|
|
323
|
-
export type EditFileInput = z.infer<typeof EditFileInputSchema>;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Input for the apply_patch tool
|
|
327
|
-
*/
|
|
328
|
-
export type ApplyPatchInput = z.infer<typeof ApplyPatchInputSchema>;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Input for the skills tool
|
|
332
|
-
*/
|
|
333
|
-
export type SkillsInput = z.infer<typeof SkillsInputSchema>;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Input for the ask_followup_question tool
|
|
337
|
-
*/
|
|
338
|
-
export type AskQuestionInput = z.infer<typeof AskQuestionInputSchema>;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Input for the submit and exit tool
|
|
342
|
-
*/
|
|
343
|
-
export type SubmitInput = z.infer<typeof SubmitInputSchema>;
|