@clinebot/core 0.0.35 → 0.0.37-nightly.1777939956
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 +12 -3
- package/dist/ClineCore.d.ts +245 -118
- package/dist/account/cline-account-service.d.ts +0 -1
- package/dist/account/index.d.ts +1 -2
- package/dist/account/rpc.d.ts +6 -7
- 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 -1
- 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/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 +45 -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 +4 -7
- package/dist/extensions/config/runtime-commands.d.ts +1 -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 +1 -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 +2 -3
- package/dist/extensions/context/basic-compaction.d.ts +0 -1
- package/dist/extensions/context/compaction-shared.d.ts +5 -5
- 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 +15 -3
- package/dist/extensions/plugin/plugin-load-report.d.ts +0 -1
- package/dist/extensions/plugin/plugin-loader.d.ts +13 -8
- package/dist/extensions/plugin/plugin-module-import.d.ts +0 -1
- package/dist/extensions/plugin/plugin-sandbox.d.ts +21 -3
- package/dist/extensions/plugin/plugin-targeting.d.ts +6 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -485
- package/dist/extensions/tools/constants.d.ts +1 -1
- package/dist/extensions/tools/definitions.d.ts +15 -17
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts +0 -1
- package/dist/extensions/tools/executors/apply-patch.d.ts +3 -2
- 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 +1 -2
- package/dist/extensions/tools/executors/web-fetch.d.ts +0 -1
- package/dist/extensions/tools/helpers.d.ts +1 -1
- package/dist/extensions/tools/index.d.ts +5 -5
- package/dist/extensions/tools/model-tool-routing.d.ts +0 -1
- package/dist/extensions/tools/presets.d.ts +30 -48
- package/dist/extensions/tools/runtime.d.ts +24 -0
- package/dist/extensions/tools/schemas.d.ts +25 -4
- package/dist/extensions/tools/team/delegated-agent.d.ts +4 -5
- package/dist/extensions/tools/team/index.d.ts +0 -1
- package/dist/extensions/tools/team/multi-agent.d.ts +7 -4
- 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 +8 -8
- package/dist/extensions/tools/types.d.ts +11 -17
- 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 +7 -3
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/subprocess-runner.d.ts +0 -1
- package/dist/hooks/subprocess.d.ts +8 -2
- package/dist/hub/client/connect.d.ts +14 -0
- package/dist/hub/client/index.d.ts +82 -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 +720 -0
- package/dist/hub/daemon/index.d.ts +8 -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 +717 -0
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +74 -0
- package/dist/hub/runtime-host/remote-runtime-host.d.ts +9 -0
- package/dist/hub/server/browser-websocket.d.ts +17 -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 +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/server/native-transport.d.ts +16 -0
- package/dist/index.d.ts +59 -36
- package/dist/index.js +477 -824
- 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 +85 -0
- package/dist/runtime/host/history.d.ts +18 -0
- package/dist/runtime/host/host.d.ts +7 -0
- 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 +4 -5
- package/dist/runtime/host/runtime-host.d.ts +162 -0
- package/dist/runtime/{runtime-builder.d.ts → orchestration/runtime-builder.d.ts} +0 -1
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +101 -0
- package/dist/runtime/{runtime-oauth-token-manager.d.ts → orchestration/runtime-oauth-token-manager.d.ts} +1 -2
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +215 -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/{rules.d.ts → safety/rules.d.ts} +2 -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 +18 -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 +26 -0
- package/dist/services/llms/provider-settings.d.ts +244 -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 +14 -10
- package/dist/services/plugin-tools.d.ts +15 -0
- package/dist/services/providers/local-provider-registry.d.ts +199 -24
- package/dist/services/providers/local-provider-service.d.ts +15 -14
- 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 +7 -3
- package/dist/services/storage/file-team-store.d.ts +0 -1
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +1 -2
- package/dist/services/storage/provider-settings-manager.d.ts +1 -1
- 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 +43 -2
- 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 -15
- package/dist/services/usage.d.ts +3 -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/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/{session-graph.d.ts → models/session-graph.d.ts} +2 -3
- package/dist/session/{session-manifest.d.ts → models/session-manifest.d.ts} +1 -2
- package/dist/session/{session-service.d.ts → models/session-row.d.ts} +13 -35
- package/dist/session/{file-session-service.d.ts → services/file-session-service.d.ts} +1 -2
- package/dist/session/services/message-builder.d.ts +56 -0
- package/dist/session/{persistence-service.d.ts → services/persistence-service.d.ts} +14 -27
- package/dist/session/services/session-service.d.ts +13 -0
- package/dist/session/session-snapshot.d.ts +57 -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 +21 -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/{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 +33 -18
- package/dist/types/common.d.ts +0 -1
- package/dist/types/config.d.ts +19 -10
- package/dist/types/events.d.ts +15 -7
- package/dist/types/provider-settings.d.ts +4 -6
- package/dist/types/session.d.ts +26 -6
- package/dist/types/sessions.d.ts +0 -1
- package/dist/types/storage.d.ts +0 -1
- package/dist/types.d.ts +24 -14
- package/dist/version.d.ts +0 -1
- package/package.json +26 -8
- 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/extensions/config/agent-config-loader.d.ts +0 -19
- 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/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/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-file-hooks.d.ts.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/persistent.d.ts +0 -64
- package/dist/hooks/persistent.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/index.d.ts.map +0 -1
- package/dist/runtime/history.d.ts +0 -4
- package/dist/runtime/history.d.ts.map +0 -1
- package/dist/runtime/host.d.ts +0 -9
- package/dist/runtime/host.d.ts.map +0 -1
- package/dist/runtime/rpc-runtime-ensure.d.ts +0 -65
- package/dist/runtime/rpc-runtime-ensure.d.ts.map +0 -1
- package/dist/runtime/rpc-spawn-lease.d.ts +0 -8
- package/dist/runtime/rpc-spawn-lease.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-host.d.ts +0 -105
- 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.d.ts +0 -61
- 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/services/agent-events.d.ts.map +0 -1
- package/dist/services/config.d.ts.map +0 -1
- package/dist/services/local-runtime-bootstrap.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 +0 -5
- package/dist/services/workspace-manifest.d.ts.map +0 -1
- package/dist/session/file-session-service.d.ts.map +0 -1
- package/dist/session/persistence-service.d.ts.map +0 -1
- package/dist/session/rpc-session-service.d.ts +0 -16
- package/dist/session/rpc-session-service.d.ts.map +0 -1
- package/dist/session/session-graph.d.ts.map +0 -1
- package/dist/session/session-manifest.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/sqlite-rpc-session-backend.d.ts +0 -31
- package/dist/session/sqlite-rpc-session-backend.d.ts.map +0 -1
- package/dist/session/workspace-manager.d.ts.map +0 -1
- package/dist/transports/local.d.ts +0 -105
- package/dist/transports/local.d.ts.map +0 -1
- package/dist/transports/rpc.d.ts +0 -51
- package/dist/transports/rpc.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.test.ts +0 -226
- package/src/ClineCore.ts +0 -313
- package/src/account/cline-account-service.test.ts +0 -185
- package/src/account/cline-account-service.ts +0 -300
- package/src/account/featurebase-token.test.ts +0 -175
- package/src/account/index.ts +0 -24
- package/src/account/rpc.test.ts +0 -63
- package/src/account/rpc.ts +0 -185
- package/src/account/types.ts +0 -108
- package/src/auth/bounded-ttl-cache.test.ts +0 -38
- package/src/auth/bounded-ttl-cache.ts +0 -53
- package/src/auth/client.test.ts +0 -69
- package/src/auth/client.ts +0 -46
- package/src/auth/cline.test.ts +0 -267
- package/src/auth/cline.ts +0 -724
- package/src/auth/codex.test.ts +0 -170
- package/src/auth/codex.ts +0 -491
- package/src/auth/oca.test.ts +0 -340
- package/src/auth/oca.ts +0 -588
- package/src/auth/server.test.ts +0 -287
- package/src/auth/server.ts +0 -265
- package/src/auth/types.ts +0 -110
- package/src/auth/utils.test.ts +0 -128
- package/src/auth/utils.ts +0 -247
- package/src/extensions/config/agent-config-loader.test.ts +0 -236
- package/src/extensions/config/agent-config-loader.ts +0 -104
- package/src/extensions/config/agent-config-parser.ts +0 -198
- package/src/extensions/config/hooks-config-loader.test.ts +0 -20
- package/src/extensions/config/hooks-config-loader.ts +0 -117
- package/src/extensions/config/index.ts +0 -77
- package/src/extensions/config/runtime-commands.test.ts +0 -115
- package/src/extensions/config/runtime-commands.ts +0 -76
- package/src/extensions/config/unified-config-file-watcher.test.ts +0 -196
- package/src/extensions/config/unified-config-file-watcher.ts +0 -496
- package/src/extensions/config/user-instruction-config-loader.test.ts +0 -246
- package/src/extensions/config/user-instruction-config-loader.ts +0 -548
- 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 -458
- package/src/extensions/context/compaction.test.ts +0 -483
- 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.test.ts +0 -238
- package/src/extensions/mcp/config-loader.ts +0 -219
- package/src/extensions/mcp/index.ts +0 -42
- package/src/extensions/mcp/manager.test.ts +0 -105
- 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.test.ts +0 -184
- package/src/extensions/plugin/plugin-config-loader.ts +0 -105
- package/src/extensions/plugin/plugin-load-report.ts +0 -20
- package/src/extensions/plugin/plugin-loader.test.ts +0 -292
- package/src/extensions/plugin/plugin-loader.ts +0 -160
- package/src/extensions/plugin/plugin-module-import.ts +0 -278
- package/src/extensions/plugin/plugin-sandbox-bootstrap.ts +0 -458
- package/src/extensions/plugin/plugin-sandbox.test.ts +0 -423
- package/src/extensions/plugin/plugin-sandbox.ts +0 -442
- package/src/extensions/tools/constants.ts +0 -35
- package/src/extensions/tools/definitions.test.ts +0 -780
- package/src/extensions/tools/definitions.ts +0 -748
- package/src/extensions/tools/executors/apply-patch-parser.ts +0 -520
- package/src/extensions/tools/executors/apply-patch.ts +0 -359
- package/src/extensions/tools/executors/bash.test.ts +0 -87
- package/src/extensions/tools/executors/bash.ts +0 -207
- package/src/extensions/tools/executors/editor.test.ts +0 -35
- package/src/extensions/tools/executors/editor.ts +0 -219
- package/src/extensions/tools/executors/file-read.test.ts +0 -125
- 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 -278
- package/src/extensions/tools/executors/web-fetch.ts +0 -259
- package/src/extensions/tools/helpers.ts +0 -130
- package/src/extensions/tools/index.ts +0 -174
- package/src/extensions/tools/model-tool-routing.test.ts +0 -86
- package/src/extensions/tools/model-tool-routing.ts +0 -134
- package/src/extensions/tools/presets.test.ts +0 -70
- package/src/extensions/tools/presets.ts +0 -205
- package/src/extensions/tools/schemas.ts +0 -346
- package/src/extensions/tools/team/delegated-agent.ts +0 -131
- package/src/extensions/tools/team/index.ts +0 -5
- package/src/extensions/tools/team/multi-agent.lifecycle.test.ts +0 -455
- package/src/extensions/tools/team/multi-agent.ts +0 -1729
- 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.test.ts +0 -381
- 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.test.ts +0 -918
- package/src/extensions/tools/team/team-tools.ts +0 -821
- package/src/extensions/tools/types.ts +0 -360
- package/src/hooks/checkpoint-hooks.test.ts +0 -168
- package/src/hooks/checkpoint-hooks.ts +0 -238
- package/src/hooks/hook-file-hooks.test.ts +0 -311
- package/src/hooks/hook-file-hooks.ts +0 -873
- package/src/hooks/index.ts +0 -25
- package/src/hooks/persistent.ts +0 -661
- package/src/hooks/subprocess-runner.ts +0 -196
- package/src/hooks/subprocess.ts +0 -460
- package/src/index.ts +0 -587
- package/src/runtime/history.test.ts +0 -114
- package/src/runtime/history.ts +0 -237
- package/src/runtime/host.test.ts +0 -230
- package/src/runtime/host.ts +0 -362
- package/src/runtime/index.ts +0 -22
- package/src/runtime/rpc-runtime-ensure.test.ts +0 -123
- package/src/runtime/rpc-runtime-ensure.ts +0 -659
- package/src/runtime/rpc-spawn-lease.test.ts +0 -81
- package/src/runtime/rpc-spawn-lease.ts +0 -156
- package/src/runtime/rules.ts +0 -37
- package/src/runtime/runtime-builder.team-persistence.test.ts +0 -245
- package/src/runtime/runtime-builder.test.ts +0 -615
- package/src/runtime/runtime-builder.ts +0 -742
- package/src/runtime/runtime-host.ts +0 -178
- package/src/runtime/runtime-oauth-token-manager.test.ts +0 -137
- package/src/runtime/runtime-oauth-token-manager.ts +0 -272
- package/src/runtime/runtime-parity.test.ts +0 -143
- package/src/runtime/session-runtime.ts +0 -79
- package/src/runtime/subprocess-sandbox.ts +0 -255
- package/src/runtime/tool-approval.ts +0 -102
- package/src/services/agent-events.ts +0 -256
- package/src/services/config.ts +0 -5
- package/src/services/local-runtime-bootstrap.ts +0 -280
- package/src/services/providers/local-provider-registry.ts +0 -240
- package/src/services/providers/local-provider-service.test.ts +0 -1062
- package/src/services/providers/local-provider-service.ts +0 -707
- package/src/services/session-artifacts.ts +0 -138
- package/src/services/session-data.test.ts +0 -160
- package/src/services/session-data.ts +0 -390
- package/src/services/session-telemetry.ts +0 -98
- package/src/services/storage/artifact-store.ts +0 -1
- package/src/services/storage/file-team-store.ts +0 -254
- package/src/services/storage/index.ts +0 -11
- package/src/services/storage/provider-settings-legacy-migration.test.ts +0 -424
- package/src/services/storage/provider-settings-legacy-migration.ts +0 -826
- package/src/services/storage/provider-settings-manager.test.ts +0 -191
- package/src/services/storage/provider-settings-manager.ts +0 -152
- 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 -541
- package/src/services/storage/team-store.ts +0 -36
- package/src/services/telemetry/ITelemetryAdapter.ts +0 -94
- package/src/services/telemetry/OpenTelemetryAdapter.test.ts +0 -157
- package/src/services/telemetry/OpenTelemetryAdapter.ts +0 -348
- package/src/services/telemetry/OpenTelemetryProvider.test.ts +0 -326
- package/src/services/telemetry/OpenTelemetryProvider.ts +0 -415
- package/src/services/telemetry/TelemetryLoggerSink.test.ts +0 -42
- package/src/services/telemetry/TelemetryLoggerSink.ts +0 -121
- package/src/services/telemetry/TelemetryService.test.ts +0 -134
- package/src/services/telemetry/TelemetryService.ts +0 -139
- package/src/services/telemetry/core-events.ts +0 -400
- package/src/services/telemetry/distinct-id.test.ts +0 -57
- 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.d.ts +0 -11
- package/src/services/workspace/file-indexer.test.ts +0 -156
- package/src/services/workspace/file-indexer.ts +0 -351
- package/src/services/workspace/index.ts +0 -7
- package/src/services/workspace/mention-enricher.test.ts +0 -106
- package/src/services/workspace/mention-enricher.ts +0 -122
- package/src/services/workspace-manifest.ts +0 -54
- package/src/session/file-session-service.ts +0 -282
- package/src/session/index.ts +0 -53
- package/src/session/persistence-service.test.ts +0 -300
- package/src/session/persistence-service.ts +0 -944
- package/src/session/rpc-session-service.ts +0 -114
- package/src/session/session-graph.ts +0 -92
- package/src/session/session-manifest.ts +0 -29
- package/src/session/session-service.team-persistence.test.ts +0 -48
- package/src/session/session-service.ts +0 -683
- package/src/session/session-team-coordination.ts +0 -240
- package/src/session/sqlite-rpc-session-backend.ts +0 -301
- package/src/session/workspace-manager.ts +0 -100
- package/src/transports/local.e2e.test.ts +0 -380
- package/src/transports/local.test.ts +0 -2559
- package/src/transports/local.ts +0 -1500
- package/src/transports/rpc.test.ts +0 -82
- package/src/transports/rpc.ts +0 -665
- package/src/transports/runtime-host-support.ts +0 -86
- package/src/types/chat-schema.ts +0 -82
- package/src/types/common.ts +0 -26
- package/src/types/config.ts +0 -210
- package/src/types/events.ts +0 -78
- package/src/types/index.ts +0 -23
- package/src/types/provider-settings.ts +0 -43
- package/src/types/session.ts +0 -110
- package/src/types/sessions.ts +0 -37
- package/src/types/storage.ts +0 -56
- package/src/types.ts +0 -127
- package/src/version.ts +0 -3
package/README.md
CHANGED
|
@@ -57,7 +57,8 @@ await cline.dispose();
|
|
|
57
57
|
|
|
58
58
|
Use it when a host needs to prepare workspace-scoped runtime state before each
|
|
59
59
|
session starts, then apply watcher/extensions/telemetry inputs through
|
|
60
|
-
`localRuntime
|
|
60
|
+
explicit `localRuntime` bootstrap fields without widening the shared host
|
|
61
|
+
contract.
|
|
61
62
|
|
|
62
63
|
## Main APIs
|
|
63
64
|
|
|
@@ -68,8 +69,17 @@ Use `@clinebot/core` for host-facing runtime assembly:
|
|
|
68
69
|
- `ClineCore.create(...)`
|
|
69
70
|
- `createRuntimeHost(...)`
|
|
70
71
|
- `LocalRuntimeHost`
|
|
72
|
+
- `HubRuntimeHost` and `RemoteRuntimeHost`
|
|
71
73
|
- `DefaultRuntimeBuilder`
|
|
72
74
|
|
|
75
|
+
`ClineCore` is the app-facing session API. The lower-level `RuntimeHost`
|
|
76
|
+
boundary uses runtime-primitive names such as `startSession` and `runTurn` so
|
|
77
|
+
transport adapters stay distinct from product methods like `start` and `send`.
|
|
78
|
+
Service-style operations such as pending prompt edits, accumulated usage lookup,
|
|
79
|
+
and active-session model switching are exposed through `ClineCore` when the
|
|
80
|
+
selected transport supports them rather than being part of the minimal host
|
|
81
|
+
primitive vocabulary.
|
|
82
|
+
|
|
73
83
|
### Default Tools
|
|
74
84
|
|
|
75
85
|
`@clinebot/core` owns the built-in host tools and executors:
|
|
@@ -84,13 +94,12 @@ The package also exports storage and settings helpers such as:
|
|
|
84
94
|
|
|
85
95
|
- `ProviderSettingsManager`
|
|
86
96
|
- `SqliteTeamStore`
|
|
87
|
-
- SQLite
|
|
97
|
+
- SQLite-backed local session stores and artifacts through `@clinebot/core`
|
|
88
98
|
|
|
89
99
|
## Related Packages
|
|
90
100
|
|
|
91
101
|
- `@clinebot/agents`: stateless agent loop and tool primitives
|
|
92
102
|
- `@clinebot/llms`: provider/model configuration and handlers
|
|
93
|
-
- `@clinebot/rpc`: remote session and runtime transport
|
|
94
103
|
|
|
95
104
|
## More Examples
|
|
96
105
|
|
package/dist/ClineCore.d.ts
CHANGED
|
@@ -1,155 +1,282 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { ClineCoreAutomationApi, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, RestoreInput, RestoreResult } from "./cline-core/types";
|
|
2
|
+
import type { PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
|
|
3
|
+
import type { CoreSessionEvent } from "./types/events";
|
|
4
|
+
import type { SessionHistoryRecord } from "./types/sessions";
|
|
5
|
+
export type { ClineAutomationEventIngressResult, ClineAutomationEventLog, ClineAutomationEventSuppression, ClineAutomationListEventsOptions, ClineAutomationListRunsOptions, ClineAutomationListSpecsOptions, ClineAutomationRun, ClineAutomationRunStatus, ClineAutomationSpec, ClineCoreAutomationApi, ClineCoreAutomationOptions, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, HubOptions, RemoteOptions, RestoreInput, RestoreOptions, RestoreResult, RuntimeHostMode, StartSessionBootstrap, } from "./cline-core/types";
|
|
6
|
+
/**
|
|
7
|
+
* The primary entry point for the Cline Core SDK.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { ClineCore } from "@clinebot/core";
|
|
12
|
+
*
|
|
13
|
+
* const cline = await ClineCore.create({ clientName: "my-app" });
|
|
14
|
+
* const session = await cline.start({ ... });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class ClineCore {
|
|
18
|
+
readonly clientName: string | undefined;
|
|
19
|
+
readonly runtimeAddress: string | undefined;
|
|
20
|
+
readonly automation: ClineCoreAutomationApi;
|
|
21
|
+
readonly settings: ClineCoreSettingsApi;
|
|
22
|
+
readonly pendingPrompts: PendingPromptsServiceApi;
|
|
23
|
+
private readonly host;
|
|
24
|
+
private readonly prepare;
|
|
25
|
+
private readonly capabilities;
|
|
26
|
+
private readonly logger;
|
|
27
|
+
private readonly telemetry;
|
|
28
|
+
private readonly distinctId;
|
|
29
|
+
private readonly automationService;
|
|
30
|
+
private readonly activeSessionBootstraps;
|
|
31
|
+
private readonly unsubscribeBootstrapCleanup;
|
|
32
|
+
private constructor();
|
|
10
33
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
34
|
+
* Creates a new ClineCore instance.
|
|
35
|
+
*
|
|
36
|
+
* This is the primary factory method for initializing the SDK. It sets up the runtime
|
|
37
|
+
* host (local, hub, or remote) based on the provided options and prepares the SDK for
|
|
38
|
+
* starting sessions.
|
|
39
|
+
*
|
|
40
|
+
* @param options Configuration options for the SDK instance
|
|
41
|
+
* @returns A promise that resolves to a new ClineCore instance
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const cline = await ClineCore.create({
|
|
46
|
+
* clientName: "my-app",
|
|
47
|
+
* backendMode: "local",
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
13
50
|
*/
|
|
14
|
-
|
|
51
|
+
static create(options?: ClineCoreOptions): Promise<ClineCore>;
|
|
52
|
+
private disposeSessionBootstrap;
|
|
15
53
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
54
|
+
* Starts a new Cline session with the provided configuration.
|
|
55
|
+
*
|
|
56
|
+
* This method initializes and begins a new agent session. It handles session setup,
|
|
57
|
+
* runs any preparation hooks, and returns session metadata along with event streams.
|
|
58
|
+
* The session continues to run until explicitly stopped or aborted.
|
|
59
|
+
*
|
|
60
|
+
* @param input The session configuration and startup parameters
|
|
61
|
+
* @returns A promise that resolves to session metadata and event stream
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const result = await cline.start({
|
|
66
|
+
* config: {
|
|
67
|
+
* providerId: "anthropic",
|
|
68
|
+
* modelId: "claude-opus-4-1",
|
|
69
|
+
* },
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* // Subscribe to session events
|
|
73
|
+
* result.subscribe((event) => {
|
|
74
|
+
* console.log("Session event:", event);
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
18
77
|
*/
|
|
19
|
-
|
|
78
|
+
start(input: StartSessionInput): Promise<StartSessionResult>;
|
|
20
79
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
80
|
+
* Starts a new Cline session with extended core-specific configuration.
|
|
81
|
+
* This overload allows specifying local runtime options and config overrides.
|
|
23
82
|
*/
|
|
24
|
-
|
|
83
|
+
start(input: ClineCoreStartInput): Promise<StartSessionResult>;
|
|
25
84
|
/**
|
|
26
|
-
*
|
|
85
|
+
* Sends a message or command to an active session.
|
|
86
|
+
*
|
|
87
|
+
* This method communicates with a running session, allowing you to send user messages,
|
|
88
|
+
* tool responses, or other session input while the session is in progress.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* await cline.send(sessionId, {
|
|
93
|
+
* type: "user_message",
|
|
94
|
+
* text: "Please implement the login feature",
|
|
95
|
+
* });
|
|
96
|
+
* ```
|
|
27
97
|
*/
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export type { RuntimeHostMode };
|
|
31
|
-
export interface ClineCoreStartInput extends Omit<StartSessionInput, "config" | "localRuntime"> {
|
|
32
|
-
config: CoreSessionConfig;
|
|
33
|
-
localRuntime?: LocalRuntimeStartOptions;
|
|
34
|
-
}
|
|
35
|
-
export interface ClineCoreOptions {
|
|
98
|
+
send: RuntimeHost["runTurn"];
|
|
36
99
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
100
|
+
* Retrieves accumulated token and cost usage for a session.
|
|
101
|
+
*
|
|
102
|
+
* Returns metrics about the session's resource consumption, including tokens used
|
|
103
|
+
* across different API providers and associated costs. Useful for monitoring and billing.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* const usage = await cline.getAccumulatedUsage(sessionId);
|
|
108
|
+
* console.log(`Total cost: $${usage.totalCost}`);
|
|
109
|
+
* ```
|
|
39
110
|
*/
|
|
40
|
-
|
|
111
|
+
getAccumulatedUsage: SessionUsageRuntimeService["getAccumulatedUsage"];
|
|
41
112
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
113
|
+
* Aborts an in-flight tool execution without stopping the session.
|
|
114
|
+
*
|
|
115
|
+
* Interrupts the current tool operation (e.g., file read, shell command) while keeping
|
|
116
|
+
* the session alive. The session can continue processing after the abort. Use this for
|
|
117
|
+
* cancelling long-running operations.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* // Stop the current operation but keep the session running
|
|
122
|
+
* await cline.abort(sessionId);
|
|
123
|
+
* ```
|
|
45
124
|
*/
|
|
46
|
-
|
|
125
|
+
abort: RuntimeHost["abort"];
|
|
47
126
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
127
|
+
* Stops an active session gracefully.
|
|
128
|
+
*
|
|
129
|
+
* Terminates the session and cleans up associated resources. Unlike abort, this
|
|
130
|
+
* completely ends the session. The session cannot be resumed after stopping.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* // Cleanly shutdown the session
|
|
135
|
+
* await cline.stop(sessionId);
|
|
136
|
+
* ```
|
|
53
137
|
*/
|
|
54
|
-
|
|
138
|
+
stop: RuntimeHost["stopSession"];
|
|
55
139
|
/**
|
|
56
|
-
*
|
|
140
|
+
* Disposes the ClineCore instance and all associated resources.
|
|
141
|
+
*
|
|
142
|
+
* Shuts down the runtime host, closes connections, and cleans up all active sessions
|
|
143
|
+
* and bootstraps. Call this when you're done using the SDK instance, typically at
|
|
144
|
+
* application shutdown. After calling dispose, the instance cannot be reused.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* // Clean up when done
|
|
149
|
+
* await cline.dispose();
|
|
150
|
+
* ```
|
|
57
151
|
*/
|
|
58
|
-
|
|
152
|
+
dispose: RuntimeHost["dispose"];
|
|
59
153
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
154
|
+
* Retrieves information about a specific session by ID.
|
|
155
|
+
*
|
|
156
|
+
* Fetches the current metadata and state of a session, including configuration,
|
|
157
|
+
* status, and other session details.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* const session = await cline.get(sessionId);
|
|
162
|
+
* console.log("Session status:", session?.status);
|
|
163
|
+
* ```
|
|
62
164
|
*/
|
|
63
|
-
|
|
165
|
+
get: RuntimeHost["getSession"];
|
|
64
166
|
/**
|
|
65
|
-
*
|
|
66
|
-
* If omitted, telemetry is a no-op.
|
|
167
|
+
* Lists recent sessions through the shared history-listing path.
|
|
67
168
|
*/
|
|
68
|
-
|
|
169
|
+
listHistory: (options?: ClineCoreListHistoryOptions) => Promise<SessionHistoryRecord[]>;
|
|
69
170
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
171
|
+
* Lists recent sessions with inferred history display metadata.
|
|
172
|
+
*
|
|
173
|
+
* Retrieves a paginated list of recent sessions, optionally limited by the
|
|
174
|
+
* provided count.
|
|
175
|
+
*
|
|
176
|
+
* @param limit Maximum number of sessions to return (defaults to 200)
|
|
177
|
+
* @returns A promise resolving to an array of session history records
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* const sessions = await cline.list(50);
|
|
182
|
+
* sessions.forEach((session) => {
|
|
183
|
+
* console.log(`Session ${session.sessionId}: ${session.metadata?.title}`);
|
|
184
|
+
* });
|
|
185
|
+
* ```
|
|
72
186
|
*/
|
|
73
|
-
|
|
187
|
+
list: (limit?: number, options?: Omit<ClineCoreListHistoryOptions, "limit">) => Promise<SessionHistoryRecord[]>;
|
|
74
188
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
189
|
+
* Permanently deletes a session and all its associated data.
|
|
190
|
+
*
|
|
191
|
+
* Removes the session from storage and cleans up any related resources. This is
|
|
192
|
+
* a destructive operation that cannot be undone.
|
|
193
|
+
*
|
|
194
|
+
* @param sessionId The ID of the session to delete
|
|
195
|
+
* @returns A promise that resolves to true if the session was deleted, false if not found
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```ts
|
|
199
|
+
* const deleted = await cline.delete(sessionId);
|
|
200
|
+
* if (deleted) {
|
|
201
|
+
* console.log("Session deleted successfully");
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
77
204
|
*/
|
|
78
|
-
|
|
205
|
+
delete: RuntimeHost["deleteSession"];
|
|
79
206
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
207
|
+
* Updates an existing session's metadata.
|
|
208
|
+
*
|
|
209
|
+
* Modifies session properties like title or other mutable metadata while preserving
|
|
210
|
+
* message history and other session data.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* await cline.update(sessionId, {
|
|
215
|
+
* title: "Updated session title",
|
|
216
|
+
* });
|
|
217
|
+
* ```
|
|
83
218
|
*/
|
|
84
|
-
|
|
219
|
+
update: RuntimeHost["updateSession"];
|
|
85
220
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
221
|
+
* Reads message history for a session.
|
|
222
|
+
*
|
|
223
|
+
* Retrieves the full message transcript for a specific session, including all
|
|
224
|
+
* user messages, agent responses, and tool interactions.
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```ts
|
|
228
|
+
* const messages = await cline.readMessages(sessionId);
|
|
229
|
+
* messages.forEach((msg) => {
|
|
230
|
+
* console.log(`${msg.role}: ${msg.content}`);
|
|
231
|
+
* });
|
|
232
|
+
* ```
|
|
88
233
|
*/
|
|
89
|
-
|
|
234
|
+
readMessages: RuntimeHost["readSessionMessages"];
|
|
235
|
+
restore(input: RestoreInput): Promise<RestoreResult>;
|
|
90
236
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
237
|
+
* Handles hook events from the runtime environment.
|
|
238
|
+
*
|
|
239
|
+
* Processes system or environment events (e.g., workspace changes, external signals)
|
|
240
|
+
* that may affect the current session. This is typically called by the host environment
|
|
241
|
+
* rather than directly by consumer code.
|
|
242
|
+
*
|
|
93
243
|
* @internal
|
|
94
244
|
*/
|
|
95
|
-
|
|
245
|
+
ingestHookEvent: RuntimeHost["dispatchHookEvent"];
|
|
96
246
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
247
|
+
* Subscribes to session events.
|
|
248
|
+
*
|
|
249
|
+
* Registers a listener for all session events (messages, state changes, errors, etc.).
|
|
250
|
+
* Returns an unsubscribe function to stop listening.
|
|
100
251
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
252
|
+
* @param listener Callback function invoked for each event
|
|
253
|
+
* @param options Optional configuration for the subscription
|
|
254
|
+
* @returns An unsubscribe function
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```ts
|
|
258
|
+
* const unsubscribe = cline.subscribe((event) => {
|
|
259
|
+
* if (event.type === "message") {
|
|
260
|
+
* console.log("New message:", event.payload.message);
|
|
261
|
+
* }
|
|
262
|
+
* });
|
|
263
|
+
*
|
|
264
|
+
* // Later, stop listening
|
|
265
|
+
* unsubscribe();
|
|
266
|
+
* ```
|
|
103
267
|
*/
|
|
104
|
-
|
|
268
|
+
subscribe(listener: (event: CoreSessionEvent) => void, options?: RuntimeHostSubscribeOptions): () => void;
|
|
105
269
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
270
|
+
* Updates the AI model used by an active session.
|
|
271
|
+
*
|
|
272
|
+
* Switches the session to use a different AI model while maintaining the session state
|
|
273
|
+
* and message history. This allows you to continue a conversation with a different model.
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* ```ts
|
|
277
|
+
* // Switch to a different model mid-session
|
|
278
|
+
* await cline.updateSessionModel(sessionId, "claude-opus-4-1");
|
|
279
|
+
* ```
|
|
109
280
|
*/
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
export interface StartSessionBootstrap {
|
|
113
|
-
applyToStartSessionInput(input: ClineCoreStartInput): Promise<ClineCoreStartInput> | ClineCoreStartInput;
|
|
114
|
-
dispose?(): Promise<void> | void;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* The primary entry point for the Cline Core SDK.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```ts
|
|
121
|
-
* import { ClineCore } from "@clinebot/core";
|
|
122
|
-
*
|
|
123
|
-
* const cline = await ClineCore.create({ clientName: "my-app" });
|
|
124
|
-
* const session = await cline.start({ ... });
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
export declare class ClineCore implements RuntimeHost {
|
|
128
|
-
readonly clientName: string | undefined;
|
|
129
|
-
readonly runtimeAddress: string | undefined;
|
|
130
|
-
private readonly host;
|
|
131
|
-
private readonly prepare;
|
|
132
|
-
private readonly activeSessionBootstraps;
|
|
133
|
-
private readonly unsubscribeBootstrapCleanup;
|
|
134
|
-
private constructor();
|
|
135
|
-
static create(options?: ClineCoreOptions): Promise<ClineCore>;
|
|
136
|
-
private disposeSessionBootstrap;
|
|
137
|
-
private toClineCoreStartInput;
|
|
138
|
-
private normalizeStartInput;
|
|
139
|
-
start(input: StartSessionInput): Promise<StartSessionResult>;
|
|
140
|
-
start(input: ClineCoreStartInput): Promise<StartSessionResult>;
|
|
141
|
-
send: RuntimeHost["send"];
|
|
142
|
-
getAccumulatedUsage: RuntimeHost["getAccumulatedUsage"];
|
|
143
|
-
abort: RuntimeHost["abort"];
|
|
144
|
-
stop: RuntimeHost["stop"];
|
|
145
|
-
dispose: RuntimeHost["dispose"];
|
|
146
|
-
get: RuntimeHost["get"];
|
|
147
|
-
list: RuntimeHost["list"];
|
|
148
|
-
delete: RuntimeHost["delete"];
|
|
149
|
-
update: RuntimeHost["update"];
|
|
150
|
-
readMessages: RuntimeHost["readMessages"];
|
|
151
|
-
handleHookEvent: RuntimeHost["handleHookEvent"];
|
|
152
|
-
subscribe: RuntimeHost["subscribe"];
|
|
153
|
-
updateSessionModel: RuntimeHost["updateSessionModel"];
|
|
281
|
+
updateSessionModel: SessionModelRuntimeService["updateSessionModel"];
|
|
154
282
|
}
|
|
155
|
-
//# sourceMappingURL=ClineCore.d.ts.map
|
package/dist/account/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { ClineAccountService, type ClineAccountServiceOptions, } from "./cline-account-service";
|
|
2
|
-
export { type ClineAccountOperations,
|
|
2
|
+
export { type ClineAccountOperations, executeClineAccountAction, isClineAccountActionRequest, type ProviderActionExecutor, RpcClineAccountService, } from "./rpc";
|
|
3
3
|
export type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, ClineOrganization, FeaturebaseTokenResponse, UserRemoteConfigOrganization, UserRemoteConfigResponse, } from "./types";
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/account/rpc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ClineAccountActionRequest, ProviderActionRequest } from "@clinebot/shared";
|
|
2
2
|
import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser, FeaturebaseTokenResponse } from "./types";
|
|
3
3
|
export interface ClineAccountOperations {
|
|
4
4
|
fetchMe(): Promise<ClineAccountUser>;
|
|
@@ -14,16 +14,16 @@ export interface ClineAccountOperations {
|
|
|
14
14
|
switchAccount(organizationId?: string | null): Promise<void>;
|
|
15
15
|
fetchFeaturebaseToken?(): Promise<FeaturebaseTokenResponse | undefined>;
|
|
16
16
|
}
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export interface
|
|
20
|
-
runProviderAction(request:
|
|
17
|
+
export declare function isClineAccountActionRequest(request: ProviderActionRequest): request is ClineAccountActionRequest;
|
|
18
|
+
export declare function executeClineAccountAction(request: ClineAccountActionRequest, service: ClineAccountOperations): Promise<unknown>;
|
|
19
|
+
export interface ProviderActionExecutor {
|
|
20
|
+
runProviderAction(request: ProviderActionRequest): Promise<{
|
|
21
21
|
result: unknown;
|
|
22
22
|
}>;
|
|
23
23
|
}
|
|
24
24
|
export declare class RpcClineAccountService implements ClineAccountOperations {
|
|
25
25
|
private readonly executor;
|
|
26
|
-
constructor(executor:
|
|
26
|
+
constructor(executor: ProviderActionExecutor);
|
|
27
27
|
fetchMe(): Promise<ClineAccountUser>;
|
|
28
28
|
fetchBalance(userId?: string): Promise<ClineAccountBalance>;
|
|
29
29
|
fetchUsageTransactions(userId?: string): Promise<ClineAccountUsageTransaction[]>;
|
|
@@ -38,4 +38,3 @@ export declare class RpcClineAccountService implements ClineAccountOperations {
|
|
|
38
38
|
fetchFeaturebaseToken(): Promise<FeaturebaseTokenResponse | undefined>;
|
|
39
39
|
private request;
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=rpc.d.ts.map
|
package/dist/account/types.d.ts
CHANGED
package/dist/auth/client.d.ts
CHANGED
|
@@ -28,4 +28,3 @@ export interface OAuthClientCallbacksOptions {
|
|
|
28
28
|
onServerClose?: (info: OAuthServerCloseInfo) => void | Promise<void>;
|
|
29
29
|
}
|
|
30
30
|
export declare function createOAuthClientCallbacks(options: OAuthClientCallbacksOptions): OAuthLoginCallbacks;
|
|
31
|
-
//# sourceMappingURL=client.d.ts.map
|
package/dist/auth/cline.d.ts
CHANGED
|
@@ -66,4 +66,3 @@ export declare function refreshClineToken(current: ClineOAuthCredentials, option
|
|
|
66
66
|
export declare function getValidClineCredentials(currentCredentials: ClineOAuthCredentials | null, providerOptions: ClineOAuthProviderOptions, options?: ClineTokenResolution): Promise<ClineOAuthCredentials | null>;
|
|
67
67
|
export declare function createClineOAuthProvider(options: ClineOAuthProviderOptions): OAuthProviderInterface;
|
|
68
68
|
export {};
|
|
69
|
-
//# sourceMappingURL=cline.d.ts.map
|
package/dist/auth/codex.d.ts
CHANGED
|
@@ -41,4 +41,3 @@ export declare function getValidOpenAICodexCredentials(currentCredentials: OAuth
|
|
|
41
41
|
export declare function isOpenAICodexTokenExpired(credentials: OAuthCredentials, refreshBufferMs?: number): boolean;
|
|
42
42
|
export declare function normalizeOpenAICodexCredentials(credentials: OAuthCredentials): OAuthCredentials;
|
|
43
43
|
export declare const openaiCodexOAuthProvider: OAuthProviderInterface;
|
|
44
|
-
//# sourceMappingURL=codex.d.ts.map
|
package/dist/auth/oca.d.ts
CHANGED
package/dist/auth/server.d.ts
CHANGED
package/dist/auth/types.d.ts
CHANGED
package/dist/auth/utils.d.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AutomationEventEnvelope, BasicLogger, ExtensionContext, ITelemetryService } from "@clinebot/shared";
|
|
2
|
+
import type { CronService } from "../cron/service/cron-service";
|
|
3
|
+
import type { HubScheduleRuntimeHandlers } from "../cron/service/schedule-service";
|
|
4
|
+
import type { RuntimeHost } from "../runtime/host/runtime-host";
|
|
5
|
+
import type { ClineAutomationEventIngressResult, ClineAutomationEventLog, ClineAutomationListEventsOptions, ClineAutomationListRunsOptions, ClineAutomationListSpecsOptions, ClineAutomationRun, ClineAutomationSpec, ClineCoreAutomationApi, ClineCoreAutomationOptions } from "./types";
|
|
6
|
+
export declare function normalizeAutomationOptions(options: ClineCoreAutomationOptions | boolean | undefined): ClineCoreAutomationOptions | undefined;
|
|
7
|
+
export declare function normalizeAutomationCronScope(scope: ClineCoreAutomationOptions["cronScope"]): "global" | "workspace" | undefined;
|
|
8
|
+
export declare class ClineCoreAutomationController implements ClineCoreAutomationApi {
|
|
9
|
+
private readonly getService;
|
|
10
|
+
constructor(getService: () => CronService);
|
|
11
|
+
start(): Promise<void>;
|
|
12
|
+
stop(): Promise<void>;
|
|
13
|
+
reconcileNow(): Promise<void>;
|
|
14
|
+
ingestEvent(event: AutomationEventEnvelope): ClineAutomationEventIngressResult;
|
|
15
|
+
listEvents(options?: ClineAutomationListEventsOptions): ClineAutomationEventLog[];
|
|
16
|
+
getEvent(eventId: string): ClineAutomationEventLog | undefined;
|
|
17
|
+
listSpecs(options?: ClineAutomationListSpecsOptions): ClineAutomationSpec[];
|
|
18
|
+
listRuns(options?: ClineAutomationListRunsOptions): ClineAutomationRun[];
|
|
19
|
+
}
|
|
20
|
+
export interface ClineCoreAutomationRuntimeHandlersInput {
|
|
21
|
+
host: RuntimeHost;
|
|
22
|
+
getExtensionContext(): ExtensionContext | undefined;
|
|
23
|
+
}
|
|
24
|
+
export declare function createClineCoreAutomationRuntimeHandlers(input: ClineCoreAutomationRuntimeHandlersInput): HubScheduleRuntimeHandlers;
|
|
25
|
+
export interface ClineCoreAutomationExtensionContextInput {
|
|
26
|
+
automationService?: CronService;
|
|
27
|
+
automation: ClineCoreAutomationApi;
|
|
28
|
+
context?: ExtensionContext;
|
|
29
|
+
clientName?: string;
|
|
30
|
+
distinctId?: string;
|
|
31
|
+
logger?: BasicLogger;
|
|
32
|
+
telemetry?: ITelemetryService;
|
|
33
|
+
}
|
|
34
|
+
export declare function createClineCoreAutomationExtensionContext(input: ClineCoreAutomationExtensionContextInput): ExtensionContext | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PendingPromptsRuntimeService, PendingPromptsServiceApi, RuntimeHost, SessionModelRuntimeService, SessionUsageRuntimeService } from "../runtime/host/runtime-host";
|
|
2
|
+
import { type ClineCoreSettingsApi } from "../settings";
|
|
3
|
+
export type RuntimeHostServiceExtensions = RuntimeHost & Partial<PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionModelRuntimeService>;
|
|
4
|
+
export declare function createClineCoreSettingsApi(host: RuntimeHost): ClineCoreSettingsApi;
|
|
5
|
+
export declare function createClineCorePendingPromptsApi(host: RuntimeHost): PendingPromptsServiceApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExtensionContext } from "@clinebot/shared";
|
|
2
|
+
import type { RuntimeCapabilities } from "../runtime/capabilities";
|
|
3
|
+
import type { StartSessionInput } from "../runtime/host/runtime-host";
|
|
4
|
+
import type { ClineCoreStartInput } from "./types";
|
|
5
|
+
export declare function toClineCoreStartInput(input: StartSessionInput | ClineCoreStartInput): ClineCoreStartInput;
|
|
6
|
+
export interface NormalizeClineCoreStartInputOptions {
|
|
7
|
+
defaultCapabilities?: RuntimeCapabilities;
|
|
8
|
+
withExtensionContext?: (context?: ExtensionContext) => ExtensionContext | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function normalizeClineCoreStartInput(input: ClineCoreStartInput, options?: NormalizeClineCoreStartInputOptions): StartSessionInput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ITelemetryService } from "@clinebot/shared";
|
|
2
|
+
import type { ClineCoreStartInput } from "./types";
|
|
3
|
+
export interface EmitSessionStartedTelemetryInput {
|
|
4
|
+
input: ClineCoreStartInput;
|
|
5
|
+
sessionId: string;
|
|
6
|
+
telemetry?: ITelemetryService;
|
|
7
|
+
clientName?: string;
|
|
8
|
+
runtimeAddress?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function emitSessionStartedTelemetry(input: EmitSessionStartedTelemetryInput): void;
|