@clinebot/core 0.0.35 → 0.0.37
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 +1 -2
- package/dist/ClineCore.d.ts +362 -39
- package/dist/ClineCore.d.ts.map +1 -1
- package/dist/account/cline-account-service.d.ts.map +1 -1
- package/dist/account/index.d.ts +1 -1
- package/dist/account/index.d.ts.map +1 -1
- package/dist/account/rpc.d.ts +6 -6
- package/dist/account/rpc.d.ts.map +1 -1
- package/dist/cron/cron-event-ingress.d.ts +38 -0
- package/dist/cron/cron-event-ingress.d.ts.map +1 -0
- package/dist/cron/cron-materializer.d.ts +36 -0
- package/dist/cron/cron-materializer.d.ts.map +1 -0
- package/dist/cron/cron-reconciler.d.ts +62 -0
- package/dist/cron/cron-reconciler.d.ts.map +1 -0
- package/dist/cron/cron-report-writer.d.ts +41 -0
- package/dist/cron/cron-report-writer.d.ts.map +1 -0
- package/dist/cron/cron-runner.d.ts +43 -0
- package/dist/cron/cron-runner.d.ts.map +1 -0
- package/dist/cron/cron-schema.d.ts +3 -0
- package/dist/cron/cron-schema.d.ts.map +1 -0
- package/dist/cron/cron-service.d.ts +57 -0
- package/dist/cron/cron-service.d.ts.map +1 -0
- package/dist/cron/cron-spec-parser.d.ts +27 -0
- package/dist/cron/cron-spec-parser.d.ts.map +1 -0
- package/dist/cron/cron-watcher.d.ts +23 -0
- package/dist/cron/cron-watcher.d.ts.map +1 -0
- package/dist/cron/resource-limiter.d.ts +9 -0
- package/dist/cron/resource-limiter.d.ts.map +1 -0
- package/dist/cron/schedule-command-service.d.ts +10 -0
- package/dist/cron/schedule-command-service.d.ts.map +1 -0
- package/dist/cron/schedule-service.d.ts +100 -0
- package/dist/cron/schedule-service.d.ts.map +1 -0
- package/dist/cron/scheduler.d.ts +68 -0
- package/dist/cron/scheduler.d.ts.map +1 -0
- package/dist/cron/sqlite-cron-store.d.ts +230 -0
- package/dist/cron/sqlite-cron-store.d.ts.map +1 -0
- package/dist/cron/sqlite-schedule-store.d.ts +52 -0
- package/dist/cron/sqlite-schedule-store.d.ts.map +1 -0
- package/dist/extensions/config/agent-config-loader.d.ts +4 -3
- package/dist/extensions/config/agent-config-loader.d.ts.map +1 -1
- package/dist/extensions/config/runtime-commands.d.ts +1 -0
- package/dist/extensions/config/runtime-commands.d.ts.map +1 -1
- package/dist/extensions/config/user-instruction-config-loader.d.ts +1 -0
- package/dist/extensions/config/user-instruction-config-loader.d.ts.map +1 -1
- package/dist/extensions/context/agentic-compaction.d.ts +2 -2
- package/dist/extensions/context/agentic-compaction.d.ts.map +1 -1
- package/dist/extensions/context/compaction-shared.d.ts +5 -4
- package/dist/extensions/context/compaction-shared.d.ts.map +1 -1
- package/dist/extensions/context/compaction.d.ts.map +1 -1
- package/dist/extensions/plugin/plugin-config-loader.d.ts +15 -2
- package/dist/extensions/plugin/plugin-config-loader.d.ts.map +1 -1
- package/dist/extensions/plugin/plugin-loader.d.ts +13 -7
- package/dist/extensions/plugin/plugin-loader.d.ts.map +1 -1
- package/dist/extensions/plugin/plugin-module-import.d.ts.map +1 -1
- package/dist/extensions/plugin/plugin-sandbox.d.ts +21 -2
- package/dist/extensions/plugin/plugin-sandbox.d.ts.map +1 -1
- package/dist/extensions/plugin/plugin-targeting.d.ts +7 -0
- package/dist/extensions/plugin/plugin-targeting.d.ts.map +1 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +237 -276
- package/dist/extensions/tools/constants.d.ts +1 -0
- package/dist/extensions/tools/constants.d.ts.map +1 -1
- package/dist/extensions/tools/definitions.d.ts +3 -4
- package/dist/extensions/tools/definitions.d.ts.map +1 -1
- package/dist/extensions/tools/executors/apply-patch.d.ts +3 -1
- package/dist/extensions/tools/executors/apply-patch.d.ts.map +1 -1
- package/dist/extensions/tools/executors/editor.d.ts.map +1 -1
- package/dist/extensions/tools/executors/search.d.ts +1 -1
- package/dist/extensions/tools/executors/search.d.ts.map +1 -1
- package/dist/extensions/tools/helpers.d.ts +1 -0
- package/dist/extensions/tools/helpers.d.ts.map +1 -1
- package/dist/extensions/tools/index.d.ts +3 -2
- package/dist/extensions/tools/index.d.ts.map +1 -1
- package/dist/extensions/tools/presets.d.ts +27 -44
- package/dist/extensions/tools/presets.d.ts.map +1 -1
- package/dist/extensions/tools/runtime.d.ts +25 -0
- package/dist/extensions/tools/runtime.d.ts.map +1 -0
- package/dist/extensions/tools/schemas.d.ts +25 -3
- package/dist/extensions/tools/schemas.d.ts.map +1 -1
- package/dist/extensions/tools/team/delegated-agent.d.ts +2 -2
- package/dist/extensions/tools/team/delegated-agent.d.ts.map +1 -1
- package/dist/extensions/tools/team/multi-agent.d.ts +7 -3
- package/dist/extensions/tools/team/multi-agent.d.ts.map +1 -1
- package/dist/extensions/tools/team/team-tools.d.ts +1 -0
- package/dist/extensions/tools/team/team-tools.d.ts.map +1 -1
- package/dist/extensions/tools/types.d.ts +0 -5
- package/dist/extensions/tools/types.d.ts.map +1 -1
- package/dist/hooks/hook-bridge.d.ts +118 -0
- package/dist/hooks/hook-bridge.d.ts.map +1 -0
- package/dist/hooks/hook-file-hooks.d.ts +6 -2
- package/dist/hooks/hook-file-hooks.d.ts.map +1 -1
- package/dist/hooks/hook-registry.d.ts +16 -0
- package/dist/hooks/hook-registry.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/subprocess.d.ts +8 -1
- package/dist/hooks/subprocess.d.ts.map +1 -1
- package/dist/hub/browser-websocket.d.ts +18 -0
- package/dist/hub/browser-websocket.d.ts.map +1 -0
- package/dist/hub/client.d.ts +51 -0
- package/dist/hub/client.d.ts.map +1 -0
- package/dist/hub/connect.d.ts +15 -0
- package/dist/hub/connect.d.ts.map +1 -0
- package/dist/hub/daemon-entry.d.ts +2 -0
- package/dist/hub/daemon-entry.d.ts.map +1 -0
- package/dist/hub/daemon-entry.js +1305 -0
- package/dist/hub/daemon.d.ts +5 -0
- package/dist/hub/daemon.d.ts.map +1 -0
- package/dist/hub/defaults.d.ts +17 -0
- package/dist/hub/defaults.d.ts.map +1 -0
- package/dist/hub/discovery.d.ts +29 -0
- package/dist/hub/discovery.d.ts.map +1 -0
- package/dist/hub/index.d.ts +15 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +1294 -0
- package/dist/hub/native-transport.d.ts +17 -0
- package/dist/hub/native-transport.d.ts.map +1 -0
- package/dist/hub/runtime-handlers.d.ts +11 -0
- package/dist/hub/runtime-handlers.d.ts.map +1 -0
- package/dist/hub/server.d.ts +104 -0
- package/dist/hub/server.d.ts.map +1 -0
- package/dist/hub/session-client.d.ts +90 -0
- package/dist/hub/session-client.d.ts.map +1 -0
- package/dist/hub/start-shared-server.d.ts +19 -0
- package/dist/hub/start-shared-server.d.ts.map +1 -0
- package/dist/hub/transport.d.ts +8 -0
- package/dist/hub/transport.d.ts.map +1 -0
- package/dist/hub/ui-client.d.ts +45 -0
- package/dist/hub/ui-client.d.ts.map +1 -0
- package/dist/hub/workspace.d.ts +4 -0
- package/dist/hub/workspace.d.ts.map +1 -0
- package/dist/index.d.ts +29 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +782 -471
- package/dist/llms/cline-recommended-models.d.ts +20 -0
- package/dist/llms/cline-recommended-models.d.ts.map +1 -0
- package/dist/llms/configured-provider-registry.d.ts +28 -0
- package/dist/llms/configured-provider-registry.d.ts.map +1 -0
- package/dist/llms/handler-factory.d.ts +16 -0
- package/dist/llms/handler-factory.d.ts.map +1 -0
- package/dist/llms/provider-defaults.d.ts +27 -0
- package/dist/llms/provider-defaults.d.ts.map +1 -0
- package/dist/llms/provider-settings.d.ts +245 -0
- package/dist/llms/provider-settings.d.ts.map +1 -0
- package/dist/llms/runtime-config.d.ts +4 -0
- package/dist/llms/runtime-config.d.ts.map +1 -0
- package/dist/llms/runtime-registry.d.ts +20 -0
- package/dist/llms/runtime-registry.d.ts.map +1 -0
- package/dist/llms/runtime-types.d.ts +85 -0
- package/dist/llms/runtime-types.d.ts.map +1 -0
- package/dist/runtime/agent-config-adapter.d.ts +148 -0
- package/dist/runtime/agent-config-adapter.d.ts.map +1 -0
- package/dist/runtime/agent-runtime-config-builder.d.ts +96 -0
- package/dist/runtime/agent-runtime-config-builder.d.ts.map +1 -0
- package/dist/runtime/history.d.ts +6 -0
- package/dist/runtime/history.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +1 -2
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/loop-detection.d.ts +59 -0
- package/dist/runtime/loop-detection.d.ts.map +1 -0
- package/dist/runtime/mistake-tracker.d.ts +69 -0
- package/dist/runtime/mistake-tracker.d.ts.map +1 -0
- package/dist/runtime/rules.d.ts +1 -0
- package/dist/runtime/rules.d.ts.map +1 -1
- package/dist/runtime/runtime-builder.d.ts.map +1 -1
- package/dist/runtime/runtime-event-adapter.d.ts +102 -0
- package/dist/runtime/runtime-event-adapter.d.ts.map +1 -0
- package/dist/runtime/runtime-host.d.ts +49 -26
- package/dist/runtime/runtime-host.d.ts.map +1 -1
- package/dist/runtime/runtime-oauth-token-manager.d.ts.map +1 -1
- package/dist/runtime/session-runtime-orchestrator.d.ts +261 -0
- package/dist/runtime/session-runtime-orchestrator.d.ts.map +1 -0
- package/dist/runtime/session-runtime.d.ts +16 -21
- package/dist/runtime/session-runtime.d.ts.map +1 -1
- package/dist/runtime/user-input-builder.d.ts +24 -0
- package/dist/runtime/user-input-builder.d.ts.map +1 -0
- package/dist/services/global-settings.d.ts +12 -0
- package/dist/services/global-settings.d.ts.map +1 -0
- package/dist/services/index.js +28 -0
- package/dist/services/local-runtime-bootstrap.d.ts +9 -3
- package/dist/services/local-runtime-bootstrap.d.ts.map +1 -1
- package/dist/services/plugin-tools.d.ts +16 -0
- package/dist/services/plugin-tools.d.ts.map +1 -0
- package/dist/services/providers/local-provider-registry.d.ts +199 -23
- package/dist/services/providers/local-provider-registry.d.ts.map +1 -1
- package/dist/services/providers/local-provider-service.d.ts +15 -13
- package/dist/services/providers/local-provider-service.d.ts.map +1 -1
- package/dist/services/session-data.d.ts +1 -1
- package/dist/services/session-data.d.ts.map +1 -1
- package/dist/services/session-telemetry.d.ts +7 -2
- package/dist/services/session-telemetry.d.ts.map +1 -1
- package/dist/services/storage/file-team-store.d.ts.map +1 -1
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +1 -1
- package/dist/services/storage/provider-settings-legacy-migration.d.ts.map +1 -1
- package/dist/services/storage/provider-settings-manager.d.ts +1 -0
- package/dist/services/storage/provider-settings-manager.d.ts.map +1 -1
- package/dist/services/storage/sqlite-team-store.d.ts.map +1 -1
- package/dist/services/workspace-manifest.d.ts +11 -0
- package/dist/services/workspace-manifest.d.ts.map +1 -1
- package/dist/session/conversation-store.d.ts +30 -0
- package/dist/session/conversation-store.d.ts.map +1 -0
- package/dist/session/message-builder.d.ts +65 -0
- package/dist/session/message-builder.d.ts.map +1 -0
- package/dist/session/persistence-service.d.ts +11 -23
- package/dist/session/persistence-service.d.ts.map +1 -1
- package/dist/session/session-manifest-store.d.ts +22 -0
- package/dist/session/session-manifest-store.d.ts.map +1 -0
- package/dist/session/session-manifest.d.ts +1 -1
- package/dist/session/session-row.d.ts +93 -0
- package/dist/session/session-row.d.ts.map +1 -0
- package/dist/session/session-service.d.ts +2 -102
- package/dist/session/session-service.d.ts.map +1 -1
- package/dist/session/subagent-session-manager.d.ts +36 -0
- package/dist/session/subagent-session-manager.d.ts.map +1 -0
- package/dist/session/team-persistence-store.d.ts +24 -0
- package/dist/session/team-persistence-store.d.ts.map +1 -0
- package/dist/transports/hub.d.ts +58 -0
- package/dist/transports/hub.d.ts.map +1 -0
- package/dist/transports/local.d.ts +23 -9
- package/dist/transports/local.d.ts.map +1 -1
- package/dist/transports/remote.d.ts +10 -0
- package/dist/transports/remote.d.ts.map +1 -0
- package/dist/transports/runtime-host-support.d.ts +3 -2
- package/dist/transports/runtime-host-support.d.ts.map +1 -1
- package/dist/types/chat-schema.d.ts +15 -17
- package/dist/types/chat-schema.d.ts.map +1 -1
- package/dist/types/config.d.ts +17 -7
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/events.d.ts +7 -6
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/provider-settings.d.ts +4 -5
- package/dist/types/provider-settings.d.ts.map +1 -1
- package/dist/types/session.d.ts +7 -3
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types.d.ts +11 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -6
- package/src/ClineCore.ts +757 -44
- package/src/account/cline-account-service.ts +44 -6
- package/src/account/index.ts +3 -3
- package/src/account/rpc.ts +12 -12
- package/src/cron/cron-event-ingress.ts +357 -0
- package/src/cron/cron-materializer.ts +97 -0
- package/src/cron/cron-reconciler.ts +241 -0
- package/src/cron/cron-report-writer.ts +153 -0
- package/src/cron/cron-runner.ts +495 -0
- package/src/cron/cron-schema.ts +127 -0
- package/src/cron/cron-service.ts +163 -0
- package/src/cron/cron-spec-parser.ts +489 -0
- package/src/cron/cron-watcher.ts +102 -0
- package/src/cron/index.ts +15 -0
- package/src/cron/resource-limiter.ts +46 -0
- package/src/cron/schedule-command-service.ts +193 -0
- package/src/cron/schedule-service.ts +703 -0
- package/src/cron/scheduler.ts +772 -0
- package/src/cron/sqlite-cron-store.ts +1286 -0
- package/src/cron/sqlite-schedule-store.ts +708 -0
- package/src/extensions/config/agent-config-loader.ts +17 -7
- package/src/extensions/config/runtime-commands.ts +6 -0
- package/src/extensions/config/user-instruction-config-loader.ts +1 -0
- package/src/extensions/context/agentic-compaction.ts +3 -3
- package/src/extensions/context/basic-compaction.ts +2 -2
- package/src/extensions/context/compaction-shared.ts +5 -4
- package/src/extensions/context/compaction.ts +3 -3
- package/src/extensions/plugin/plugin-config-loader.ts +37 -2
- package/src/extensions/plugin/plugin-loader.ts +69 -9
- package/src/extensions/plugin/plugin-module-import.ts +0 -2
- package/src/extensions/plugin/plugin-sandbox-bootstrap.ts +243 -39
- package/src/extensions/plugin/plugin-sandbox.ts +173 -29
- package/src/extensions/plugin/plugin-targeting.ts +32 -0
- package/src/extensions/tools/constants.ts +2 -0
- package/src/extensions/tools/definitions.ts +61 -71
- package/src/extensions/tools/executors/apply-patch.ts +69 -80
- package/src/extensions/tools/executors/editor.ts +4 -3
- package/src/extensions/tools/executors/search.ts +195 -3
- package/src/extensions/tools/helpers.ts +24 -0
- package/src/extensions/tools/index.ts +11 -2
- package/src/extensions/tools/presets.ts +32 -47
- package/src/extensions/tools/runtime.ts +261 -0
- package/src/extensions/tools/schemas.ts +17 -20
- package/src/extensions/tools/team/delegated-agent.ts +8 -3
- package/src/extensions/tools/team/multi-agent.ts +135 -19
- package/src/extensions/tools/team/team-tools.ts +172 -91
- package/src/extensions/tools/types.ts +0 -6
- package/src/hooks/hook-bridge.ts +489 -0
- package/src/hooks/hook-file-hooks.ts +66 -5
- package/src/hooks/hook-registry.ts +257 -0
- package/src/hooks/index.ts +0 -7
- package/src/hooks/subprocess-runner.ts +1 -1
- package/src/hooks/subprocess.ts +9 -0
- package/src/hub/browser-websocket.ts +159 -0
- package/src/hub/client.ts +633 -0
- package/src/hub/connect.ts +156 -0
- package/src/hub/daemon-entry.ts +122 -0
- package/src/hub/daemon.ts +284 -0
- package/src/hub/defaults.ts +70 -0
- package/src/hub/discovery.ts +247 -0
- package/src/hub/index.ts +14 -0
- package/src/hub/native-transport.ts +31 -0
- package/src/hub/runtime-handlers.ts +141 -0
- package/src/hub/server.ts +2317 -0
- package/src/hub/session-client.ts +502 -0
- package/src/hub/start-shared-server.ts +61 -0
- package/src/hub/transport.ts +14 -0
- package/src/hub/ui-client.ts +126 -0
- package/src/hub/workspace.ts +19 -0
- package/src/index.ts +169 -68
- package/src/llms/cline-recommended-models.ts +167 -0
- package/src/llms/configured-provider-registry.ts +193 -0
- package/src/llms/handler-factory.ts +56 -0
- package/src/llms/provider-defaults.ts +653 -0
- package/src/llms/provider-settings.ts +310 -0
- package/src/llms/runtime-config.ts +43 -0
- package/src/llms/runtime-registry.ts +172 -0
- package/src/llms/runtime-types.ts +121 -0
- package/src/runtime/agent-config-adapter.ts +636 -0
- package/src/runtime/agent-runtime-config-builder.ts +205 -0
- package/src/runtime/error-feedback.ts +142 -0
- package/src/runtime/history.ts +137 -0
- package/src/runtime/host.ts +127 -267
- package/src/runtime/index.ts +1 -0
- package/src/runtime/loop-detection.ts +162 -0
- package/src/runtime/mistake-tracker.ts +221 -0
- package/src/runtime/rules.ts +12 -0
- package/src/runtime/runtime-builder.ts +85 -13
- package/src/runtime/runtime-event-adapter.ts +412 -0
- package/src/runtime/runtime-host.ts +134 -62
- package/src/runtime/runtime-oauth-token-manager.ts +11 -15
- package/src/runtime/session-runtime-orchestrator.ts +1253 -0
- package/src/runtime/session-runtime.ts +16 -26
- package/src/runtime/user-input-builder.ts +167 -0
- package/src/services/global-settings.ts +122 -0
- package/src/services/local-runtime-bootstrap.ts +175 -31
- package/src/services/plugin-tools.ts +86 -0
- package/src/services/providers/local-provider-registry.ts +277 -61
- package/src/services/providers/local-provider-service.ts +109 -44
- package/src/services/session-data.ts +18 -10
- package/src/services/session-telemetry.ts +6 -15
- package/src/services/storage/file-team-store.ts +1 -5
- package/src/services/storage/provider-settings-legacy-migration.ts +14 -51
- package/src/services/storage/provider-settings-manager.ts +17 -2
- package/src/services/storage/sqlite-team-store.ts +1 -5
- package/src/services/workspace-manifest.ts +18 -0
- package/src/session/conversation-store.ts +77 -0
- package/src/session/file-session-service.ts +1 -1
- package/src/session/index.ts +6 -27
- package/src/session/message-builder.ts +941 -0
- package/src/session/persistence-service.ts +119 -504
- package/src/session/session-manifest-store.ts +158 -0
- package/src/session/session-row.ts +199 -0
- package/src/session/session-service.ts +17 -376
- package/src/session/session-team-coordination.ts +1 -1
- package/src/session/subagent-session-manager.ts +397 -0
- package/src/session/team-persistence-store.ts +176 -0
- package/src/transports/hub.ts +1081 -0
- package/src/transports/local.ts +419 -93
- package/src/transports/remote.ts +27 -0
- package/src/transports/runtime-host-support.ts +63 -9
- package/src/types/chat-schema.ts +4 -5
- package/src/types/config.ts +17 -7
- package/src/types/events.ts +8 -6
- package/src/types/index.ts +3 -0
- package/src/types/provider-settings.ts +18 -7
- package/src/types/session.ts +7 -6
- package/src/types.ts +42 -2
- package/dist/hooks/persistent.d.ts +0 -64
- package/dist/hooks/persistent.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/services/telemetry/index.js +0 -15
- package/dist/session/rpc-session-service.d.ts +0 -16
- package/dist/session/rpc-session-service.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/transports/rpc.d.ts +0 -51
- package/dist/transports/rpc.d.ts.map +0 -1
- package/src/ClineCore.test.ts +0 -226
- package/src/account/cline-account-service.test.ts +0 -185
- package/src/account/featurebase-token.test.ts +0 -175
- package/src/account/rpc.test.ts +0 -63
- package/src/auth/bounded-ttl-cache.test.ts +0 -38
- package/src/auth/client.test.ts +0 -69
- package/src/auth/cline.test.ts +0 -267
- package/src/auth/codex.test.ts +0 -170
- package/src/auth/oca.test.ts +0 -340
- package/src/auth/server.test.ts +0 -287
- package/src/auth/utils.test.ts +0 -128
- package/src/extensions/config/agent-config-loader.test.ts +0 -236
- package/src/extensions/config/hooks-config-loader.test.ts +0 -20
- package/src/extensions/config/runtime-commands.test.ts +0 -115
- package/src/extensions/config/unified-config-file-watcher.test.ts +0 -196
- package/src/extensions/config/user-instruction-config-loader.test.ts +0 -246
- package/src/extensions/context/compaction.test.ts +0 -483
- package/src/extensions/mcp/config-loader.test.ts +0 -238
- package/src/extensions/mcp/manager.test.ts +0 -105
- package/src/extensions/plugin/plugin-config-loader.test.ts +0 -184
- package/src/extensions/plugin/plugin-loader.test.ts +0 -292
- package/src/extensions/plugin/plugin-sandbox.test.ts +0 -423
- package/src/extensions/tools/definitions.test.ts +0 -780
- package/src/extensions/tools/executors/bash.test.ts +0 -87
- package/src/extensions/tools/executors/editor.test.ts +0 -35
- package/src/extensions/tools/executors/file-read.test.ts +0 -125
- package/src/extensions/tools/model-tool-routing.test.ts +0 -86
- package/src/extensions/tools/presets.test.ts +0 -70
- package/src/extensions/tools/team/multi-agent.lifecycle.test.ts +0 -455
- package/src/extensions/tools/team/spawn-agent-tool.test.ts +0 -381
- package/src/extensions/tools/team/team-tools.test.ts +0 -918
- package/src/hooks/checkpoint-hooks.test.ts +0 -168
- package/src/hooks/hook-file-hooks.test.ts +0 -311
- package/src/hooks/persistent.ts +0 -661
- package/src/runtime/history.test.ts +0 -114
- package/src/runtime/host.test.ts +0 -230
- 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/runtime-builder.team-persistence.test.ts +0 -245
- package/src/runtime/runtime-builder.test.ts +0 -615
- package/src/runtime/runtime-oauth-token-manager.test.ts +0 -137
- package/src/runtime/runtime-parity.test.ts +0 -143
- package/src/services/providers/local-provider-service.test.ts +0 -1062
- package/src/services/session-data.test.ts +0 -160
- package/src/services/storage/provider-settings-legacy-migration.test.ts +0 -424
- package/src/services/storage/provider-settings-manager.test.ts +0 -191
- package/src/services/telemetry/OpenTelemetryAdapter.test.ts +0 -157
- package/src/services/telemetry/OpenTelemetryProvider.test.ts +0 -326
- package/src/services/telemetry/TelemetryLoggerSink.test.ts +0 -42
- package/src/services/telemetry/TelemetryService.test.ts +0 -134
- package/src/services/telemetry/distinct-id.test.ts +0 -57
- package/src/services/workspace/file-indexer.d.ts +0 -11
- package/src/services/workspace/file-indexer.test.ts +0 -156
- package/src/services/workspace/mention-enricher.test.ts +0 -106
- package/src/session/persistence-service.test.ts +0 -300
- package/src/session/rpc-session-service.ts +0 -114
- package/src/session/session-service.team-persistence.test.ts +0 -48
- package/src/session/sqlite-rpc-session-backend.ts +0 -301
- package/src/transports/local.e2e.test.ts +0 -380
- package/src/transports/local.test.ts +0 -2559
- package/src/transports/rpc.test.ts +0 -82
- package/src/transports/rpc.ts +0 -665
|
@@ -4,13 +4,22 @@
|
|
|
4
4
|
* This file runs inside an isolated Node.js child process spawned by
|
|
5
5
|
* {@link SubprocessSandbox}. It receives RPC calls over IPC and dynamically
|
|
6
6
|
* imports plugin modules, wiring up their contributions (tools, commands,
|
|
7
|
-
*
|
|
7
|
+
* message builders, providers) and lifecycle hooks.
|
|
8
8
|
*
|
|
9
9
|
* Because it executes in a separate process it must stay bundle-safe and only
|
|
10
10
|
* depend on local helpers that can be inlined into the sandbox build.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {
|
|
14
|
+
type AutomationEventEnvelope,
|
|
15
|
+
normalizePluginManifest,
|
|
16
|
+
type PluginManifest,
|
|
17
|
+
} from "@clinebot/shared";
|
|
13
18
|
import { importPluginModule } from "./plugin-module-import";
|
|
19
|
+
import {
|
|
20
|
+
matchesPluginManifestTargeting,
|
|
21
|
+
type PluginTargeting,
|
|
22
|
+
} from "./plugin-targeting";
|
|
14
23
|
|
|
15
24
|
// ---------------------------------------------------------------------------
|
|
16
25
|
// Types (intentionally minimal – mirrors only what the RPC protocol needs)
|
|
@@ -31,18 +40,6 @@ interface PluginCommand {
|
|
|
31
40
|
handler?: (input: string) => Promise<string>;
|
|
32
41
|
}
|
|
33
42
|
|
|
34
|
-
interface PluginShortcut {
|
|
35
|
-
name: string;
|
|
36
|
-
value: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface PluginFlag {
|
|
41
|
-
name: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
defaultValue?: boolean | string | number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
43
|
interface PluginMessageBuilder {
|
|
47
44
|
name: string;
|
|
48
45
|
build: (message: unknown[]) => unknown[]; // Message[]
|
|
@@ -54,19 +51,43 @@ interface PluginProvider {
|
|
|
54
51
|
metadata?: Record<string, unknown>;
|
|
55
52
|
}
|
|
56
53
|
|
|
54
|
+
interface PluginAutomationEventType {
|
|
55
|
+
eventType: string;
|
|
56
|
+
source: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
attributesSchema?: Record<string, unknown>;
|
|
59
|
+
payloadSchema?: Record<string, unknown>;
|
|
60
|
+
examples?: AutomationEventEnvelope[];
|
|
61
|
+
metadata?: Record<string, unknown>;
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
interface PluginApi {
|
|
58
65
|
registerTool(tool: PluginTool): void;
|
|
59
66
|
registerCommand(command: PluginCommand): void;
|
|
60
|
-
registerShortcut(shortcut: PluginShortcut): void;
|
|
61
|
-
registerFlag(flag: PluginFlag): void;
|
|
62
67
|
registerMessageBuilder(builder: PluginMessageBuilder): void;
|
|
63
68
|
registerProvider(provider: PluginProvider): void;
|
|
69
|
+
registerAutomationEventType(eventType: PluginAutomationEventType): void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface PluginSetupCtx {
|
|
73
|
+
session?: unknown;
|
|
74
|
+
client?: unknown;
|
|
75
|
+
user?: unknown;
|
|
76
|
+
workspaceInfo?: unknown;
|
|
77
|
+
automation?: {
|
|
78
|
+
ingestEvent(event: AutomationEventEnvelope): void | Promise<void>;
|
|
79
|
+
};
|
|
80
|
+
logger?: {
|
|
81
|
+
debug(message: string, metadata?: Record<string, unknown>): void;
|
|
82
|
+
log(message: string, metadata?: Record<string, unknown>): void;
|
|
83
|
+
error(message: string, metadata?: Record<string, unknown>): void;
|
|
84
|
+
};
|
|
64
85
|
}
|
|
65
86
|
|
|
66
87
|
interface PluginModule {
|
|
67
88
|
name: string;
|
|
68
|
-
manifest:
|
|
69
|
-
setup?: (api: PluginApi) => void | Promise<void>;
|
|
89
|
+
manifest: PluginManifest;
|
|
90
|
+
setup?: (api: PluginApi, ctx: PluginSetupCtx) => void | Promise<void>;
|
|
70
91
|
[hookName: string]: unknown;
|
|
71
92
|
}
|
|
72
93
|
|
|
@@ -82,18 +103,30 @@ interface ContributionDescriptor {
|
|
|
82
103
|
metadata?: Record<string, unknown>;
|
|
83
104
|
}
|
|
84
105
|
|
|
106
|
+
interface AutomationEventTypeDescriptor {
|
|
107
|
+
id: string;
|
|
108
|
+
eventType: string;
|
|
109
|
+
source: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
attributesSchema?: Record<string, unknown>;
|
|
112
|
+
payloadSchema?: Record<string, unknown>;
|
|
113
|
+
examples?: AutomationEventEnvelope[];
|
|
114
|
+
metadata?: Record<string, unknown>;
|
|
115
|
+
}
|
|
116
|
+
|
|
85
117
|
interface PluginDescriptor {
|
|
86
118
|
pluginId: string;
|
|
87
119
|
pluginPath: string;
|
|
88
120
|
name: string;
|
|
89
|
-
manifest:
|
|
121
|
+
manifest: PluginManifest;
|
|
90
122
|
contributions: {
|
|
91
123
|
tools: ContributionDescriptor[];
|
|
92
124
|
commands: ContributionDescriptor[];
|
|
93
|
-
shortcuts: ContributionDescriptor[];
|
|
94
|
-
flags: ContributionDescriptor[];
|
|
95
125
|
messageBuilders: ContributionDescriptor[];
|
|
96
126
|
providers: ContributionDescriptor[];
|
|
127
|
+
automationEventTypes: AutomationEventTypeDescriptor[];
|
|
128
|
+
shortcuts?: ContributionDescriptor[];
|
|
129
|
+
flags?: ContributionDescriptor[];
|
|
97
130
|
};
|
|
98
131
|
}
|
|
99
132
|
|
|
@@ -132,6 +165,12 @@ function isObject(value: unknown): value is Record<string, unknown> {
|
|
|
132
165
|
return typeof value === "object" && value !== null;
|
|
133
166
|
}
|
|
134
167
|
|
|
168
|
+
function hasValidStringArray(value: unknown): value is string[] {
|
|
169
|
+
return (
|
|
170
|
+
Array.isArray(value) && value.every((entry) => typeof entry === "string")
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
135
174
|
function assertValidPluginModule(
|
|
136
175
|
plugin: unknown,
|
|
137
176
|
pluginPath: string,
|
|
@@ -145,6 +184,52 @@ function assertValidPluginModule(
|
|
|
145
184
|
if (!isObject(plugin.manifest)) {
|
|
146
185
|
throw new Error(`Invalid plugin manifest: ${pluginPath}`);
|
|
147
186
|
}
|
|
187
|
+
if (
|
|
188
|
+
Object.hasOwn(plugin.manifest, "providerIds") &&
|
|
189
|
+
!hasValidStringArray(plugin.manifest.providerIds)
|
|
190
|
+
) {
|
|
191
|
+
throw new Error(`Invalid plugin manifest.providerIds: ${pluginPath}`);
|
|
192
|
+
}
|
|
193
|
+
if (
|
|
194
|
+
Object.hasOwn(plugin.manifest, "modelIds") &&
|
|
195
|
+
!hasValidStringArray(plugin.manifest.modelIds)
|
|
196
|
+
) {
|
|
197
|
+
throw new Error(`Invalid plugin manifest.modelIds: ${pluginPath}`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function assertValidPluginSetupCtx(
|
|
202
|
+
ctx: unknown,
|
|
203
|
+
): asserts ctx is PluginSetupCtx {
|
|
204
|
+
if (!isObject(ctx)) {
|
|
205
|
+
throw new Error("Plugin setup context must be an object");
|
|
206
|
+
}
|
|
207
|
+
if (ctx.session !== undefined && !isObject(ctx.session)) {
|
|
208
|
+
throw new Error("Plugin setup context session must be an object");
|
|
209
|
+
}
|
|
210
|
+
if (ctx.client !== undefined && !isObject(ctx.client)) {
|
|
211
|
+
throw new Error("Plugin setup context client must be an object");
|
|
212
|
+
}
|
|
213
|
+
if (ctx.user !== undefined && !isObject(ctx.user)) {
|
|
214
|
+
throw new Error("Plugin setup context user must be an object");
|
|
215
|
+
}
|
|
216
|
+
if (ctx.workspaceInfo !== undefined && !isObject(ctx.workspaceInfo)) {
|
|
217
|
+
throw new Error("Plugin setup context workspaceInfo must be an object");
|
|
218
|
+
}
|
|
219
|
+
if (ctx.automation !== undefined && !isObject(ctx.automation)) {
|
|
220
|
+
throw new Error("Plugin setup context automation must be an object");
|
|
221
|
+
}
|
|
222
|
+
if (
|
|
223
|
+
ctx.automation !== undefined &&
|
|
224
|
+
typeof ctx.automation.ingestEvent !== "function"
|
|
225
|
+
) {
|
|
226
|
+
throw new Error(
|
|
227
|
+
"Plugin setup context automation.ingestEvent must be a function",
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
if (ctx.logger !== undefined && !isObject(ctx.logger)) {
|
|
231
|
+
throw new Error("Plugin setup context logger must be an object");
|
|
232
|
+
}
|
|
148
233
|
}
|
|
149
234
|
|
|
150
235
|
// ---------------------------------------------------------------------------
|
|
@@ -183,6 +268,16 @@ function emitEvent(name: string, payload?: unknown): void {
|
|
|
183
268
|
// Expose event emitter to plugins.
|
|
184
269
|
(globalThis as Record<string, unknown>).__clinePluginHost = { emitEvent };
|
|
185
270
|
|
|
271
|
+
/**
|
|
272
|
+
* Session workspace env — populated by `initialize()` and available to any
|
|
273
|
+
* plugin code that executes before the setup hook, or cannot use hook context.
|
|
274
|
+
* Prefer using PluginSetupCtx from the setup function when possible.
|
|
275
|
+
*/
|
|
276
|
+
(globalThis as Record<string, unknown>).__clineSessionEnv = {
|
|
277
|
+
cwd: undefined as string | undefined,
|
|
278
|
+
workspaceInfo: undefined as unknown,
|
|
279
|
+
};
|
|
280
|
+
|
|
186
281
|
// ---------------------------------------------------------------------------
|
|
187
282
|
// Helpers
|
|
188
283
|
// ---------------------------------------------------------------------------
|
|
@@ -192,6 +287,45 @@ function sanitizeObject(value: unknown): Record<string, unknown> {
|
|
|
192
287
|
return value as Record<string, unknown>;
|
|
193
288
|
}
|
|
194
289
|
|
|
290
|
+
function sanitizeLogMetadata(
|
|
291
|
+
value: unknown,
|
|
292
|
+
): Record<string, unknown> | undefined {
|
|
293
|
+
if (!value || typeof value !== "object") {
|
|
294
|
+
return undefined;
|
|
295
|
+
}
|
|
296
|
+
const metadata = { ...(value as Record<string, unknown>) };
|
|
297
|
+
if (metadata.error instanceof Error) {
|
|
298
|
+
metadata.error = {
|
|
299
|
+
name: metadata.error.name,
|
|
300
|
+
message: metadata.error.message,
|
|
301
|
+
stack: metadata.error.stack,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
return metadata;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function createPluginLogger(
|
|
308
|
+
pluginName: string,
|
|
309
|
+
): NonNullable<PluginSetupCtx["logger"]> {
|
|
310
|
+
const emitLog = (
|
|
311
|
+
level: "debug" | "log" | "error",
|
|
312
|
+
message: string,
|
|
313
|
+
metadata?: Record<string, unknown>,
|
|
314
|
+
) => {
|
|
315
|
+
emitEvent("plugin_log", {
|
|
316
|
+
level,
|
|
317
|
+
pluginName,
|
|
318
|
+
message,
|
|
319
|
+
metadata: sanitizeLogMetadata(metadata),
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
return {
|
|
323
|
+
debug: (message, metadata) => emitLog("debug", message, metadata),
|
|
324
|
+
log: (message, metadata) => emitLog("log", message, metadata),
|
|
325
|
+
error: (message, metadata) => emitLog("error", message, metadata),
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
195
329
|
function makeId(pluginId: string, prefix: string): string {
|
|
196
330
|
const key = `${pluginId}:${prefix}`;
|
|
197
331
|
const next = (contributionCounters.get(key) ?? 0) + 1;
|
|
@@ -199,6 +333,30 @@ function makeId(pluginId: string, prefix: string): string {
|
|
|
199
333
|
return `${pluginId}_${prefix}_${next}`;
|
|
200
334
|
}
|
|
201
335
|
|
|
336
|
+
function normalizeAutomationEventType(
|
|
337
|
+
eventType: PluginAutomationEventType,
|
|
338
|
+
): PluginAutomationEventType {
|
|
339
|
+
const normalizedEventType =
|
|
340
|
+
typeof eventType.eventType === "string" ? eventType.eventType.trim() : "";
|
|
341
|
+
const source =
|
|
342
|
+
typeof eventType.source === "string" ? eventType.source.trim() : "";
|
|
343
|
+
if (!normalizedEventType) {
|
|
344
|
+
throw new Error("Automation event type contribution requires eventType");
|
|
345
|
+
}
|
|
346
|
+
if (!source) {
|
|
347
|
+
throw new Error("Automation event type contribution requires source");
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
...eventType,
|
|
351
|
+
eventType: normalizedEventType,
|
|
352
|
+
source,
|
|
353
|
+
examples: eventType.examples ? [...eventType.examples] : undefined,
|
|
354
|
+
metadata: eventType.metadata
|
|
355
|
+
? sanitizeObject(eventType.metadata)
|
|
356
|
+
: undefined,
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
202
360
|
function getPlugin(pluginId: string): PluginState {
|
|
203
361
|
const state = pluginState.get(pluginId);
|
|
204
362
|
if (!state) {
|
|
@@ -214,16 +372,48 @@ function getPlugin(pluginId: string): PluginState {
|
|
|
214
372
|
async function initialize(args: {
|
|
215
373
|
pluginPaths?: string[];
|
|
216
374
|
exportName?: string;
|
|
375
|
+
providerId?: string;
|
|
376
|
+
modelId?: string;
|
|
377
|
+
cwd?: string;
|
|
378
|
+
session?: unknown;
|
|
379
|
+
client?: unknown;
|
|
380
|
+
user?: unknown;
|
|
381
|
+
workspaceInfo?: unknown;
|
|
382
|
+
loggerEnabled?: boolean;
|
|
217
383
|
}): Promise<InitializeResult> {
|
|
218
384
|
pluginState.clear();
|
|
219
385
|
pluginCounter = 0;
|
|
220
386
|
contributionCounters.clear();
|
|
221
387
|
|
|
388
|
+
// Apply the session's working directory so that process.cwd() and relative
|
|
389
|
+
// path resolution inside plugins reflect the correct workspace, not the
|
|
390
|
+
// host process's cwd (which may differ when --cwd was used without calling
|
|
391
|
+
// process.chdir() on the host side).
|
|
392
|
+
if (args.cwd) {
|
|
393
|
+
try {
|
|
394
|
+
process.chdir(args.cwd);
|
|
395
|
+
} catch {
|
|
396
|
+
// Ignore — best-effort; path may not exist in unusual environments.
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Keep the global escape-hatch in sync with the active session.
|
|
401
|
+
const sessionEnv = (globalThis as Record<string, unknown>)
|
|
402
|
+
.__clineSessionEnv as Record<string, unknown>;
|
|
403
|
+
if (sessionEnv) {
|
|
404
|
+
sessionEnv.cwd = args.cwd;
|
|
405
|
+
sessionEnv.workspaceInfo = args.workspaceInfo;
|
|
406
|
+
}
|
|
407
|
+
|
|
222
408
|
const descriptors: PluginDescriptor[] = [];
|
|
223
409
|
const failures: PluginInitializationFailure[] = [];
|
|
224
410
|
const warnings: PluginInitializationWarning[] = [];
|
|
225
411
|
const exportName = args.exportName || "plugin";
|
|
226
412
|
const pluginIndexByName = new Map<string, number>();
|
|
413
|
+
const targeting: PluginTargeting = {
|
|
414
|
+
providerId: args.providerId,
|
|
415
|
+
modelId: args.modelId,
|
|
416
|
+
};
|
|
227
417
|
|
|
228
418
|
for (const pluginPath of args.pluginPaths || []) {
|
|
229
419
|
let plugin: PluginModule | undefined;
|
|
@@ -232,15 +422,20 @@ async function initialize(args: {
|
|
|
232
422
|
plugin = (moduleExports.default ??
|
|
233
423
|
moduleExports[exportName]) as unknown as PluginModule;
|
|
234
424
|
assertValidPluginModule(plugin, pluginPath);
|
|
425
|
+
plugin.manifest = normalizePluginManifest(plugin.manifest);
|
|
426
|
+
if (!matchesPluginManifestTargeting(plugin.manifest, targeting)) {
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
235
429
|
|
|
236
430
|
const pluginId = `plugin_${++pluginCounter}`;
|
|
237
431
|
const contributions: PluginDescriptor["contributions"] = {
|
|
238
432
|
tools: [],
|
|
239
433
|
commands: [],
|
|
240
|
-
shortcuts: [],
|
|
241
|
-
flags: [],
|
|
242
434
|
messageBuilders: [],
|
|
243
435
|
providers: [],
|
|
436
|
+
automationEventTypes: [],
|
|
437
|
+
shortcuts: [],
|
|
438
|
+
flags: [],
|
|
244
439
|
};
|
|
245
440
|
const handlers: PluginState["handlers"] = {
|
|
246
441
|
tools: new Map(),
|
|
@@ -272,22 +467,6 @@ async function initialize(args: {
|
|
|
272
467
|
description: command.description,
|
|
273
468
|
});
|
|
274
469
|
},
|
|
275
|
-
registerShortcut: (shortcut) => {
|
|
276
|
-
contributions.shortcuts.push({
|
|
277
|
-
id: makeId(pluginId, "shortcut"),
|
|
278
|
-
name: shortcut.name,
|
|
279
|
-
value: shortcut.value,
|
|
280
|
-
description: shortcut.description,
|
|
281
|
-
});
|
|
282
|
-
},
|
|
283
|
-
registerFlag: (flag) => {
|
|
284
|
-
contributions.flags.push({
|
|
285
|
-
id: makeId(pluginId, "flag"),
|
|
286
|
-
name: flag.name,
|
|
287
|
-
description: flag.description,
|
|
288
|
-
defaultValue: flag.defaultValue,
|
|
289
|
-
});
|
|
290
|
-
},
|
|
291
470
|
registerMessageBuilder: (builder) => {
|
|
292
471
|
const id = makeId(pluginId, "builder");
|
|
293
472
|
handlers.messageBuilders.set(id, builder.build);
|
|
@@ -301,11 +480,36 @@ async function initialize(args: {
|
|
|
301
480
|
metadata: sanitizeObject(provider.metadata),
|
|
302
481
|
});
|
|
303
482
|
},
|
|
483
|
+
registerAutomationEventType: (eventType) => {
|
|
484
|
+
contributions.automationEventTypes.push({
|
|
485
|
+
id: makeId(pluginId, "automation_event"),
|
|
486
|
+
...normalizeAutomationEventType(eventType),
|
|
487
|
+
});
|
|
488
|
+
},
|
|
304
489
|
};
|
|
305
490
|
|
|
306
491
|
if (typeof plugin.setup === "function") {
|
|
307
492
|
try {
|
|
308
|
-
|
|
493
|
+
const setupCtx = {
|
|
494
|
+
session: args.session,
|
|
495
|
+
client: args.client,
|
|
496
|
+
user: args.user,
|
|
497
|
+
workspaceInfo: args.workspaceInfo,
|
|
498
|
+
...(args.loggerEnabled
|
|
499
|
+
? { logger: createPluginLogger(plugin.name) }
|
|
500
|
+
: {}),
|
|
501
|
+
...(plugin.manifest.capabilities.includes("automationEvents")
|
|
502
|
+
? {
|
|
503
|
+
automation: {
|
|
504
|
+
ingestEvent: (event: AutomationEventEnvelope) => {
|
|
505
|
+
emitEvent("automation_event", event);
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
}
|
|
509
|
+
: {}),
|
|
510
|
+
};
|
|
511
|
+
assertValidPluginSetupCtx(setupCtx);
|
|
512
|
+
await plugin.setup(api, setupCtx);
|
|
309
513
|
} catch (error) {
|
|
310
514
|
failures.push({
|
|
311
515
|
pluginPath,
|