@cerebriline/core 4.100.240
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/LICENSE +201 -0
- package/README.md +16 -0
- package/assets/office-oxide/LICENSE-APACHE +176 -0
- package/assets/office-oxide/LICENSE-MIT +25 -0
- package/assets/office-oxide/office_oxide_bg.wasm +0 -0
- package/assets/prompt-templates/claude.md +516 -0
- package/assets/prompt-templates/deepseek.md +331 -0
- package/assets/prompt-templates/default.md +386 -0
- package/assets/prompt-templates/gemma.md +352 -0
- package/assets/prompt-templates/glm.md +334 -0
- package/assets/prompt-templates/kimi-k3.md +408 -0
- package/assets/prompt-templates/kimi.md +402 -0
- package/assets/prompt-templates/minimax.md +473 -0
- package/assets/prompt-templates/nemotron.md +358 -0
- package/assets/prompt-templates/qwen.md +612 -0
- package/dist/ClineCore.d.ts +365 -0
- package/dist/account/cline-account-service.d.ts +41 -0
- package/dist/account/index.d.ts +3 -0
- package/dist/account/rpc.d.ts +40 -0
- package/dist/account/types.d.ts +122 -0
- package/dist/auth/bounded-ttl-cache.d.ts +13 -0
- package/dist/auth/client.d.ts +30 -0
- package/dist/auth/cline.d.ts +71 -0
- package/dist/auth/codex.d.ts +40 -0
- package/dist/auth/oca.d.ts +21 -0
- package/dist/auth/provider-auth-registry.d.ts +52 -0
- package/dist/auth/server.d.ts +54 -0
- package/dist/auth/types.d.ts +103 -0
- package/dist/auth/utils.d.ts +31 -0
- package/dist/cline-core/automation.d.ts +34 -0
- package/dist/cline-core/runtime-services.d.ts +5 -0
- package/dist/cline-core/start-input.d.ts +10 -0
- package/dist/cline-core/telemetry.d.ts +10 -0
- package/dist/cline-core/types.d.ts +236 -0
- package/dist/cron/events/cron-event-ingress.d.ts +37 -0
- package/dist/cron/reports/cron-report-writer.d.ts +42 -0
- package/dist/cron/runner/cron-materializer.d.ts +35 -0
- package/dist/cron/runner/cron-runner.d.ts +60 -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 +14 -0
- package/dist/cron/service/schedule-service.d.ts +116 -0
- package/dist/cron/service/schedule-tool.d.ts +81 -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 +261 -0
- package/dist/extensions/agent-plugin/agent-skill.d.ts +21 -0
- package/dist/extensions/agent-plugin/index.d.ts +4 -0
- package/dist/extensions/agent-plugin/loader.d.ts +10 -0
- package/dist/extensions/agent-plugin/types.d.ts +67 -0
- package/dist/extensions/complexity/grammars.d.ts +92 -0
- package/dist/extensions/complexity/walker.d.ts +115 -0
- package/dist/extensions/config/builtin-templates.d.ts +10 -0
- package/dist/extensions/config/builtin-templates.generated.d.ts +5 -0
- package/dist/extensions/config/index.d.ts +15 -0
- package/dist/extensions/config/prompt-template-compaction.d.ts +92 -0
- package/dist/extensions/config/prompt-template-delta.d.ts +107 -0
- package/dist/extensions/config/prompt-template-hooks.d.ts +47 -0
- package/dist/extensions/config/prompt-template-loader.d.ts +79 -0
- package/dist/extensions/config/prompt-template-parser.d.ts +56 -0
- package/dist/extensions/config/prompt-template-review.d.ts +327 -0
- package/dist/extensions/config/prompt-template-session.d.ts +46 -0
- package/dist/extensions/config/runtime-commands.d.ts +23 -0
- package/dist/extensions/config/shipped-tool-signatures.d.ts +36 -0
- package/dist/extensions/config/skill-frontmatter-toggle.d.ts +11 -0
- package/dist/extensions/config/unified-config-file-watcher.d.ts +77 -0
- package/dist/extensions/config/user-instruction-config-loader.d.ts +77 -0
- package/dist/extensions/config/user-instruction-plugin.d.ts +26 -0
- package/dist/extensions/config/user-instruction-service.d.ts +31 -0
- package/dist/extensions/context/agentic-compaction.d.ts +129 -0
- package/dist/extensions/context/basic-compaction.d.ts +19 -0
- package/dist/extensions/context/budget-projection/index.d.ts +2 -0
- package/dist/extensions/context/budget-projection/project.d.ts +4 -0
- package/dist/extensions/context/budget-projection/types.d.ts +58 -0
- package/dist/extensions/context/capped-thinking.d.ts +195 -0
- package/dist/extensions/context/compaction-cause.d.ts +27 -0
- package/dist/extensions/context/compaction-journal.d.ts +65 -0
- package/dist/extensions/context/compaction-revisions.d.ts +72 -0
- package/dist/extensions/context/compaction-shared.d.ts +608 -0
- package/dist/extensions/context/compaction.d.ts +161 -0
- package/dist/extensions/context/context-minimum-warning.d.ts +27 -0
- package/dist/extensions/context/continuation-compaction.d.ts +260 -0
- package/dist/extensions/context/council-compaction.d.ts +262 -0
- package/dist/extensions/context/full-compaction.d.ts +44 -0
- package/dist/extensions/context/kv-pressure.d.ts +258 -0
- package/dist/extensions/context/polykv-session.d.ts +372 -0
- package/dist/extensions/context/replay-compaction.d.ts +90 -0
- package/dist/extensions/context/tool-ledger.d.ts +198 -0
- package/dist/extensions/context/work-digest.d.ts +92 -0
- package/dist/extensions/index.d.ts +7 -0
- package/dist/extensions/mcp/client.d.ts +28 -0
- package/dist/extensions/mcp/config-loader.d.ts +102 -0
- package/dist/extensions/mcp/index.d.ts +15 -0
- package/dist/extensions/mcp/manager.d.ts +23 -0
- package/dist/extensions/mcp/name-transform.d.ts +2 -0
- package/dist/extensions/mcp/oauth.d.ts +68 -0
- package/dist/extensions/mcp/plugin-server-registration.d.ts +18 -0
- package/dist/extensions/mcp/policies.d.ts +14 -0
- package/dist/extensions/mcp/remote-proxy.d.ts +9 -0
- package/dist/extensions/mcp/timeout.d.ts +2 -0
- package/dist/extensions/mcp/tools.d.ts +3 -0
- package/dist/extensions/mcp/types.d.ts +133 -0
- package/dist/extensions/plugin/plugin-config-loader.d.ts +44 -0
- package/dist/extensions/plugin/plugin-load-report.d.ts +18 -0
- package/dist/extensions/plugin/plugin-loader.d.ts +23 -0
- package/dist/extensions/plugin/plugin-module-import.d.ts +4 -0
- package/dist/extensions/plugin/plugin-sandbox.d.ts +82 -0
- package/dist/extensions/plugin/plugin-targeting.d.ts +6 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -0
- package/dist/extensions/tools/ask-lsp.d.ts +150 -0
- package/dist/extensions/tools/audio-tools.d.ts +156 -0
- package/dist/extensions/tools/browser.d.ts +137 -0
- package/dist/extensions/tools/check-file.d.ts +218 -0
- package/dist/extensions/tools/check-on-failure.d.ts +49 -0
- package/dist/extensions/tools/code-intel.d.ts +131 -0
- package/dist/extensions/tools/command-guard-extension.d.ts +22 -0
- package/dist/extensions/tools/command-guard.d.ts +29 -0
- package/dist/extensions/tools/constants.d.ts +28 -0
- package/dist/extensions/tools/definitions.d.ts +178 -0
- package/dist/extensions/tools/delimiter-balance.d.ts +121 -0
- package/dist/extensions/tools/edit-verification.d.ts +86 -0
- package/dist/extensions/tools/error-locations.d.ts +53 -0
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts +68 -0
- package/dist/extensions/tools/executors/apply-patch.d.ts +48 -0
- package/dist/extensions/tools/executors/awk-parser.d.ts +163 -0
- package/dist/extensions/tools/executors/awk.d.ts +41 -0
- package/dist/extensions/tools/executors/bash.d.ts +119 -0
- package/dist/extensions/tools/executors/document/assets.d.ts +22 -0
- package/dist/extensions/tools/executors/document/ebook.d.ts +11 -0
- package/dist/extensions/tools/executors/document/formats.d.ts +83 -0
- package/dist/extensions/tools/executors/document/images.d.ts +73 -0
- package/dist/extensions/tools/executors/document/legacy.d.ts +20 -0
- package/dist/extensions/tools/executors/document/ocr.d.ts +67 -0
- package/dist/extensions/tools/executors/document/office-oxide.d.ts +19 -0
- package/dist/extensions/tools/executors/document/office-oxide.generated.d.ts +82 -0
- package/dist/extensions/tools/executors/document/office.d.ts +10 -0
- package/dist/extensions/tools/executors/document/pdf.d.ts +6 -0
- package/dist/extensions/tools/executors/document/pdfjs.d.ts +30 -0
- package/dist/extensions/tools/executors/document/range.d.ts +18 -0
- package/dist/extensions/tools/executors/document/recognition.d.ts +67 -0
- package/dist/extensions/tools/executors/document-extract.d.ts +55 -0
- package/dist/extensions/tools/executors/editor.d.ts +68 -0
- package/dist/extensions/tools/executors/file-locks.d.ts +41 -0
- package/dist/extensions/tools/executors/file-read.d.ts +136 -0
- package/dist/extensions/tools/executors/grep.d.ts +35 -0
- package/dist/extensions/tools/executors/index.d.ts +97 -0
- package/dist/extensions/tools/executors/line-endings.d.ts +23 -0
- package/dist/extensions/tools/executors/output-limits.d.ts +58 -0
- package/dist/extensions/tools/executors/overlay-receipts.d.ts +25 -0
- package/dist/extensions/tools/executors/posix-regex.d.ts +52 -0
- package/dist/extensions/tools/executors/read-receipts.d.ts +93 -0
- package/dist/extensions/tools/executors/run-command-execution-controller.d.ts +16 -0
- package/dist/extensions/tools/executors/search.d.ts +50 -0
- package/dist/extensions/tools/executors/sed.d.ts +92 -0
- package/dist/extensions/tools/executors/unchanged-reads.d.ts +55 -0
- package/dist/extensions/tools/executors/web-fetch.d.ts +58 -0
- package/dist/extensions/tools/helpers.d.ts +59 -0
- package/dist/extensions/tools/image-edit.d.ts +76 -0
- package/dist/extensions/tools/image-generation.d.ts +183 -0
- package/dist/extensions/tools/index.d.ts +68 -0
- package/dist/extensions/tools/jev.d.ts +336 -0
- package/dist/extensions/tools/list-files.d.ts +128 -0
- package/dist/extensions/tools/media-endpoint.d.ts +160 -0
- package/dist/extensions/tools/media-tools.d.ts +140 -0
- package/dist/extensions/tools/model-tool-routing.d.ts +33 -0
- package/dist/extensions/tools/presets.d.ts +154 -0
- package/dist/extensions/tools/qa-credentials.d.ts +133 -0
- package/dist/extensions/tools/runtime.d.ts +39 -0
- package/dist/extensions/tools/schemas.d.ts +845 -0
- package/dist/extensions/tools/task-progress.d.ts +217 -0
- package/dist/extensions/tools/team/agent-admission.d.ts +127 -0
- package/dist/extensions/tools/team/agent-check.d.ts +152 -0
- package/dist/extensions/tools/team/agent-controls.d.ts +55 -0
- package/dist/extensions/tools/team/agent-file.d.ts +28 -0
- package/dist/extensions/tools/team/agent-iteration-cap.d.ts +328 -0
- package/dist/extensions/tools/team/agent-names.d.ts +29 -0
- package/dist/extensions/tools/team/agent-node-placement.d.ts +160 -0
- package/dist/extensions/tools/team/agent-placement-queue.d.ts +199 -0
- package/dist/extensions/tools/team/agent-placement.d.ts +118 -0
- package/dist/extensions/tools/team/agent-reports.d.ts +53 -0
- package/dist/extensions/tools/team/agent-rounds.d.ts +666 -0
- package/dist/extensions/tools/team/agent-sandbox-executors.d.ts +79 -0
- package/dist/extensions/tools/team/agent-slot-gate.d.ts +186 -0
- package/dist/extensions/tools/team/agent-status.d.ts +84 -0
- package/dist/extensions/tools/team/agent-trouble.d.ts +91 -0
- package/dist/extensions/tools/team/background-delegations.d.ts +106 -0
- package/dist/extensions/tools/team/batch-report.d.ts +151 -0
- package/dist/extensions/tools/team/configured-agent-config.d.ts +37 -0
- package/dist/extensions/tools/team/configured-agent-tool.d.ts +135 -0
- package/dist/extensions/tools/team/create-agent-tool.d.ts +45 -0
- package/dist/extensions/tools/team/delegate-to-agent.d.ts +105 -0
- package/dist/extensions/tools/team/delegated-agent.d.ts +272 -0
- package/dist/extensions/tools/team/delegated-sandboxes.d.ts +125 -0
- package/dist/extensions/tools/team/delegated-tools.d.ts +40 -0
- package/dist/extensions/tools/team/delegation-call-hooks.d.ts +30 -0
- package/dist/extensions/tools/team/engine-evictions.d.ts +38 -0
- package/dist/extensions/tools/team/index.d.ts +20 -0
- package/dist/extensions/tools/team/lead-agent-tools.d.ts +92 -0
- package/dist/extensions/tools/team/multi-agent.d.ts +364 -0
- package/dist/extensions/tools/team/node-reachability.d.ts +53 -0
- package/dist/extensions/tools/team/node-throughput.d.ts +40 -0
- package/dist/extensions/tools/team/placed-run.d.ts +114 -0
- package/dist/extensions/tools/team/projections.d.ts +8 -0
- package/dist/extensions/tools/team/runtime.d.ts +6 -0
- package/dist/extensions/tools/team/session-window-retry.d.ts +28 -0
- package/dist/extensions/tools/team/spawn-agent-tool.d.ts +450 -0
- package/dist/extensions/tools/team/spawn-sampling.d.ts +188 -0
- package/dist/extensions/tools/team/spawn-swarm-tool.d.ts +330 -0
- package/dist/extensions/tools/team/subagent-cancellation.d.ts +188 -0
- package/dist/extensions/tools/team/subagent-layout.d.ts +90 -0
- package/dist/extensions/tools/team/subagent-output.d.ts +73 -0
- package/dist/extensions/tools/team/subagent-progress.d.ts +211 -0
- package/dist/extensions/tools/team/subagent-prompts.d.ts +3 -0
- package/dist/extensions/tools/team/team-state-dates.d.ts +10 -0
- package/dist/extensions/tools/team/team-tools.d.ts +56 -0
- package/dist/extensions/tools/team/teammates-off.d.ts +14 -0
- package/dist/extensions/tools/team/token-split.d.ts +28 -0
- package/dist/extensions/tools/team/turn-fault-recovery.d.ts +71 -0
- package/dist/extensions/tools/types.d.ts +410 -0
- package/dist/extensions/tools/video-generation.d.ts +94 -0
- package/dist/hooks/checkpoint-hooks.d.ts +39 -0
- package/dist/hooks/hook-extension.d.ts +2 -0
- package/dist/hooks/hook-file-config.d.ts +24 -0
- package/dist/hooks/hook-file-hooks.d.ts +22 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/subprocess-runner.d.ts +21 -0
- package/dist/hooks/subprocess.d.ts +74 -0
- package/dist/hub/client/connect.d.ts +14 -0
- package/dist/hub/client/index.d.ts +146 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +62 -0
- package/dist/hub/client/session-client.d.ts +138 -0
- package/dist/hub/client/ui-client.d.ts +52 -0
- package/dist/hub/daemon/entry.d.ts +15 -0
- package/dist/hub/daemon/entry.js +2033 -0
- package/dist/hub/daemon/index.d.ts +125 -0
- package/dist/hub/daemon/runtime-handlers.d.ts +12 -0
- package/dist/hub/daemon/shutdown-coordinator.d.ts +31 -0
- package/dist/hub/daemon/start-shared-server.d.ts +18 -0
- package/dist/hub/daemon/telemetry.d.ts +19 -0
- package/dist/hub/discovery/defaults.d.ts +16 -0
- package/dist/hub/discovery/index.d.ts +139 -0
- package/dist/hub/discovery/instance-lock.d.ts +51 -0
- package/dist/hub/discovery/workspace.d.ts +13 -0
- package/dist/hub/index.d.ts +38 -0
- package/dist/hub/index.js +2023 -0
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +83 -0
- package/dist/hub/runtime-host/remote-runtime-host.d.ts +9 -0
- package/dist/hub/server/browser-websocket.d.ts +22 -0
- package/dist/hub/server/command-transport.d.ts +29 -0
- package/dist/hub/server/handlers/approval-handlers.d.ts +24 -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/connector-handlers.d.ts +20 -0
- package/dist/hub/server/handlers/context.d.ts +98 -0
- package/dist/hub/server/handlers/run-handlers.d.ts +6 -0
- package/dist/hub/server/handlers/run-queue-handlers.d.ts +33 -0
- package/dist/hub/server/handlers/session-event-projector.d.ts +7 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +30 -0
- package/dist/hub/server/hub-client-contributions.d.ts +19 -0
- package/dist/hub/server/hub-event-log.d.ts +57 -0
- package/dist/hub/server/hub-notifications.d.ts +7 -0
- package/dist/hub/server/hub-run-queue.d.ts +82 -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 +94 -0
- package/dist/hub/server/hub-server-transport.d.ts +71 -0
- package/dist/hub/server/hub-session-records.d.ts +9 -0
- package/dist/hub/server/hub-websocket-server.d.ts +12 -0
- package/dist/hub/server/index.d.ts +4 -0
- package/dist/hub/server/native-transport.d.ts +25 -0
- package/dist/hub/server/task-command-service.d.ts +11 -0
- package/dist/index.d.ts +172 -0
- package/dist/index.js +5435 -0
- package/dist/logging/early-logger.d.ts +37 -0
- package/dist/remote-config/integration.d.ts +17 -0
- package/dist/runtime/atomic/base-revision-reads.d.ts +106 -0
- package/dist/runtime/atomic/base-revision.d.ts +77 -0
- package/dist/runtime/atomic/check-first-edits.d.ts +79 -0
- package/dist/runtime/atomic/file-revisions.d.ts +268 -0
- package/dist/runtime/atomic/oracle.d.ts +178 -0
- package/dist/runtime/atomic/page-check.d.ts +39 -0
- package/dist/runtime/atomic/plan-capture.d.ts +40 -0
- package/dist/runtime/atomic/plan-text.d.ts +33 -0
- package/dist/runtime/atomic/plan-tool.d.ts +159 -0
- package/dist/runtime/atomic/proposal.d.ts +112 -0
- package/dist/runtime/atomic/propose-check-tool.d.ts +76 -0
- package/dist/runtime/atomic/protocol.d.ts +233 -0
- package/dist/runtime/atomic/restore-file-tool.d.ts +196 -0
- package/dist/runtime/atomic/revision-capture.d.ts +75 -0
- package/dist/runtime/atomic/run-check-tool.d.ts +64 -0
- package/dist/runtime/atomic/session-protocol.d.ts +304 -0
- package/dist/runtime/atomic/session-revisions.d.ts +77 -0
- package/dist/runtime/atomic/snapshot.d.ts +77 -0
- package/dist/runtime/atomic/stalled-checks.d.ts +106 -0
- package/dist/runtime/atomic/submit-transaction-tool.d.ts +50 -0
- package/dist/runtime/atomic/tool-activity.d.ts +15 -0
- package/dist/runtime/atomic/transaction-controller.d.ts +364 -0
- package/dist/runtime/atomic/unparseable-change.d.ts +35 -0
- package/dist/runtime/capabilities/index.d.ts +2 -0
- package/dist/runtime/capabilities/normalize-runtime-capabilities.d.ts +2 -0
- package/dist/runtime/capabilities/runtime-capabilities.d.ts +18 -0
- package/dist/runtime/config/agent-message-codec.d.ts +6 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +93 -0
- package/dist/runtime/config/connection-update.d.ts +40 -0
- package/dist/runtime/escalation/a2a.d.ts +109 -0
- package/dist/runtime/escalation/assessment.d.ts +54 -0
- package/dist/runtime/escalation/brief.d.ts +70 -0
- package/dist/runtime/escalation/escalate-tool.d.ts +93 -0
- package/dist/runtime/escalation/escalation-controller.d.ts +62 -0
- package/dist/runtime/escalation/escalation-session.d.ts +241 -0
- package/dist/runtime/escalation/expert-failure.d.ts +20 -0
- package/dist/runtime/escalation/expert-guards.d.ts +46 -0
- package/dist/runtime/escalation/expert-mailbox.d.ts +34 -0
- package/dist/runtime/escalation/expert-notes.d.ts +115 -0
- package/dist/runtime/escalation/expert-prompt.d.ts +29 -0
- package/dist/runtime/escalation/expert-revisions.d.ts +62 -0
- package/dist/runtime/escalation/expert-session.d.ts +164 -0
- package/dist/runtime/escalation/expert-transcript.d.ts +32 -0
- package/dist/runtime/escalation/forced-escalation.d.ts +58 -0
- package/dist/runtime/escalation/stand-down.d.ts +66 -0
- package/dist/runtime/escalation/struggle-offer.d.ts +100 -0
- package/dist/runtime/escalation/watch-tool.d.ts +34 -0
- package/dist/runtime/host/history.d.ts +19 -0
- package/dist/runtime/host/host.d.ts +7 -0
- package/dist/runtime/host/local/agent-event-bridge.d.ts +50 -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 +57 -0
- package/dist/runtime/host/local/user-files.d.ts +1 -0
- package/dist/runtime/host/local-runtime-host.d.ts +298 -0
- package/dist/runtime/host/runtime-host-support.d.ts +39 -0
- package/dist/runtime/host/runtime-host.d.ts +280 -0
- package/dist/runtime/host/steer-side-turn.d.ts +119 -0
- package/dist/runtime/orchestration/runtime-builder.d.ts +14 -0
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +104 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +28 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +339 -0
- package/dist/runtime/orchestration/session-runtime.d.ts +118 -0
- package/dist/runtime/orchestration/user-input-builder.d.ts +15 -0
- package/dist/runtime/process-start-token.d.ts +23 -0
- package/dist/runtime/safety/loop-detection.d.ts +160 -0
- package/dist/runtime/safety/mistake-tracker.d.ts +84 -0
- package/dist/runtime/safety/rules.d.ts +6 -0
- package/dist/runtime/safety/struggle-detector.d.ts +414 -0
- package/dist/runtime/safety/worker-struggle-stop.d.ts +20 -0
- package/dist/runtime/safety/worker-struggle.d.ts +166 -0
- package/dist/runtime/sandbox/agent-sandbox.d.ts +111 -0
- package/dist/runtime/sandbox/overlay-fs.d.ts +71 -0
- package/dist/runtime/sandbox/sandbox-binaries.d.ts +10 -0
- package/dist/runtime/tools/subprocess-sandbox-lifecycle.d.ts +9 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +62 -0
- package/dist/runtime/tools/tool-approval.d.ts +9 -0
- package/dist/runtime/turn-queue/harness-notes.d.ts +18 -0
- package/dist/runtime/turn-queue/pending-prompt-service.d.ts +117 -0
- package/dist/services/agent-events.d.ts +59 -0
- package/dist/services/config.d.ts +2 -0
- package/dist/services/connectors/active-connectors.d.ts +2 -0
- package/dist/services/connectors/connector-autostart.d.ts +33 -0
- package/dist/services/connectors/connector-child-env.d.ts +14 -0
- package/dist/services/connectors/connector-cleanup.d.ts +20 -0
- package/dist/services/connectors/connector-supervisor.d.ts +134 -0
- package/dist/services/connectors/daemon-connector-reconnect.d.ts +15 -0
- package/dist/services/feature-flags/FeatureFlagsService.d.ts +49 -0
- package/dist/services/feature-flags/index.d.ts +2 -0
- package/dist/services/feature-flags/posthog.d.ts +24 -0
- package/dist/services/feature-flags/posthog.js +1 -0
- package/dist/services/feature-flags/providers.d.ts +7 -0
- package/dist/services/global-settings.d.ts +113 -0
- package/dist/services/llms/apihandler-agent-model-adapter.d.ts +26 -0
- package/dist/services/llms/cline-recommended-models.d.ts +62 -0
- package/dist/services/llms/configured-provider-registry.d.ts +27 -0
- package/dist/services/llms/handler-factory.d.ts +23 -0
- package/dist/services/llms/provider-defaults.d.ts +36 -0
- package/dist/services/llms/provider-settings.d.ts +420 -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/llms/session-budget.d.ts +88 -0
- package/dist/services/local-runtime-bootstrap.d.ts +62 -0
- package/dist/services/marketplace.d.ts +41 -0
- package/dist/services/mcp-install.d.ts +35 -0
- package/dist/services/plugin-install.d.ts +52 -0
- package/dist/services/plugin-mcp-settings.d.ts +31 -0
- package/dist/services/plugin-tools.d.ts +40 -0
- package/dist/services/plugin-uninstall.d.ts +13 -0
- package/dist/services/providers/local-provider-registry.d.ts +354 -0
- package/dist/services/providers/local-provider-service.d.ts +101 -0
- package/dist/services/providers/model-source.d.ts +3 -0
- package/dist/services/providers/provider-config-fields.d.ts +37 -0
- package/dist/services/providers/provider-readiness.d.ts +10 -0
- package/dist/services/session-artifacts.d.ts +18 -0
- package/dist/services/session-data.d.ts +61 -0
- package/dist/services/session-import/claude-code.d.ts +16 -0
- package/dist/services/session-import/codex.d.ts +34 -0
- package/dist/services/session-import/index.d.ts +6 -0
- package/dist/services/session-import/opencode.d.ts +25 -0
- package/dist/services/session-import/sanitize.d.ts +16 -0
- package/dist/services/session-import/service.d.ts +31 -0
- package/dist/services/session-import/types.d.ts +87 -0
- package/dist/services/session-telemetry.d.ts +15 -0
- package/dist/services/storage/file-team-store.d.ts +32 -0
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +38 -0
- package/dist/services/storage/provider-settings-manager.d.ts +31 -0
- package/dist/services/storage/sqlite-session-store.d.ts +35 -0
- package/dist/services/storage/sqlite-team-store.d.ts +42 -0
- package/dist/services/storage/team-events-retention.d.ts +25 -0
- package/dist/services/storage/team-store.d.ts +16 -0
- package/dist/services/telemetry/ITelemetryAdapter.d.ts +54 -0
- package/dist/services/telemetry/OpenTelemetryAdapter.d.ts +43 -0
- package/dist/services/telemetry/OpenTelemetryProvider.d.ts +99 -0
- package/dist/services/telemetry/TelemetryLoggerSink.d.ts +27 -0
- package/dist/services/telemetry/TelemetryService.d.ts +40 -0
- package/dist/services/telemetry/core-events.d.ts +396 -0
- package/dist/services/telemetry/distinct-id.d.ts +2 -0
- package/dist/services/telemetry/index.d.ts +4 -0
- package/dist/services/telemetry/index.js +1 -0
- package/dist/services/usage.d.ts +19 -0
- package/dist/services/workspace/agent-schedules-workspace.d.ts +8 -0
- package/dist/services/workspace/chat-workspace.d.ts +9 -0
- package/dist/services/workspace/file-indexer.d.ts +5 -0
- package/dist/services/workspace/index.d.ts +6 -0
- package/dist/services/workspace/mention-enricher.d.ts +13 -0
- package/dist/services/workspace/workspace-manager.d.ts +27 -0
- package/dist/services/workspace/workspace-manifest.d.ts +42 -0
- package/dist/services/workspace/workspace-telemetry.d.ts +18 -0
- package/dist/session/checkpoint-diff.d.ts +25 -0
- package/dist/session/checkpoint-restore.d.ts +34 -0
- package/dist/session/display-messages.d.ts +28 -0
- package/dist/session/history-origin.d.ts +19 -0
- package/dist/session/models/session-compaction.d.ts +22 -0
- package/dist/session/models/session-graph.d.ts +15 -0
- package/dist/session/models/session-manifest.d.ts +32 -0
- package/dist/session/models/session-row.d.ts +107 -0
- package/dist/session/persisted-tool-result-content.d.ts +8 -0
- package/dist/session/search/index.d.ts +1 -0
- package/dist/session/search/session-history-search.d.ts +51 -0
- package/dist/session/services/file-session-service.d.ts +10 -0
- package/dist/session/services/message-builder.d.ts +208 -0
- package/dist/session/services/persistence-service.d.ts +92 -0
- package/dist/session/services/read-overlap.d.ts +40 -0
- package/dist/session/services/session-service.d.ts +15 -0
- package/dist/session/session-snapshot.d.ts +59 -0
- package/dist/session/session-versioning-service.d.ts +50 -0
- package/dist/session/stores/atomic-file.d.ts +1 -0
- package/dist/session/stores/conversation-store.d.ts +29 -0
- package/dist/session/stores/session-manifest-store.d.ts +49 -0
- package/dist/session/stores/team-persistence-store.d.ts +23 -0
- package/dist/session/team/index.d.ts +2 -0
- package/dist/session/team/team-child-session-manager.d.ts +35 -0
- package/dist/session/team/team-session-coordinator.d.ts +13 -0
- package/dist/session/user-run-messages.d.ts +20 -0
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/settings-service.d.ts +8 -0
- package/dist/settings/types.d.ts +83 -0
- package/dist/tasks/agenda-task-api.d.ts +20 -0
- package/dist/tasks/agenda-task-manager.d.ts +109 -0
- package/dist/tasks/agenda-task-tool.d.ts +94 -0
- package/dist/tasks/index.d.ts +9 -0
- package/dist/tasks/specs/task-spec-file-store.d.ts +38 -0
- package/dist/tasks/specs/task-spec-parser.d.ts +65 -0
- package/dist/tasks/store/sqlite-task-store.d.ts +73 -0
- package/dist/tasks/store/task-schema.d.ts +2 -0
- package/dist/tasks/task-location.d.ts +14 -0
- package/dist/tasks/task-tool.d.ts +143 -0
- package/dist/types/chat-schema.d.ts +194 -0
- package/dist/types/common.d.ts +35 -0
- package/dist/types/config.d.ts +994 -0
- package/dist/types/events.d.ts +102 -0
- package/dist/types/provider-settings.d.ts +29 -0
- package/dist/types/session.d.ts +187 -0
- package/dist/types/sessions.d.ts +42 -0
- package/dist/types/storage.d.ts +36 -0
- package/dist/types.d.ts +34 -0
- package/dist/version.d.ts +1 -0
- package/package.json +98 -0
- package/scripts/document-reader-assets.mjs +161 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One artifact for two jobs: what a swarm worker reports, and what compaction
|
|
3
|
+
* writes.
|
|
4
|
+
*
|
|
5
|
+
* These were always going to be the same thing and the reference implementation
|
|
6
|
+
* says so outright -- reuse the fan-out digest schema per compacted turn-span,
|
|
7
|
+
* so a fan-out digest and a compaction summary read identically to the model.
|
|
8
|
+
* The reason is concrete rather than tidy: a swarm round frequently returns
|
|
9
|
+
* while the lead is already over its compaction watermark, and if the two are
|
|
10
|
+
* different artifacts the round's result *adds* to the pressure it was spawned
|
|
11
|
+
* to relieve. Sharing the form means the commit-back can be fed straight to
|
|
12
|
+
* compaction instead.
|
|
13
|
+
*
|
|
14
|
+
* The sections are the ones `DEFAULT_COMPACTION_PROMPT` already names, because
|
|
15
|
+
* that prompt is in production and its output is what has to keep parsing.
|
|
16
|
+
*
|
|
17
|
+
* **Free-form JSON in a fence, read tolerantly -- not a grammar.** This is the
|
|
18
|
+
* reference implementation's own resolved decision and it is the right one: a
|
|
19
|
+
* worker made to satisfy a schema spends its turn satisfying the schema. So the
|
|
20
|
+
* parser takes a fenced block if there is one, the markdown headings if there
|
|
21
|
+
* is not, and the prose itself if there is neither. A worker that breaks the
|
|
22
|
+
* contract entirely is still represented, because the reducer cannot otherwise
|
|
23
|
+
* tell "nothing to report" from "lost", and a silently absent worker is exactly
|
|
24
|
+
* the failure this path exists to avoid.
|
|
25
|
+
*/
|
|
26
|
+
/** One heading, and the field behind it. */
|
|
27
|
+
export interface WorkDigestSection {
|
|
28
|
+
heading: string;
|
|
29
|
+
key: keyof WorkDigest;
|
|
30
|
+
/** A single paragraph, or a list of lines. */
|
|
31
|
+
list: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface WorkDigest {
|
|
34
|
+
/** Who wrote it. Absent on the lead's own compaction note. */
|
|
35
|
+
agent?: string;
|
|
36
|
+
goal?: string;
|
|
37
|
+
done?: readonly string[];
|
|
38
|
+
inProgress?: readonly string[];
|
|
39
|
+
ruledOut?: readonly string[];
|
|
40
|
+
keyFacts?: readonly string[];
|
|
41
|
+
next?: readonly string[];
|
|
42
|
+
/**
|
|
43
|
+
* Everything that did not fit the form.
|
|
44
|
+
*
|
|
45
|
+
* A worker that wrote prose still reported; this is where that lands, and
|
|
46
|
+
* it is why nothing is ever dropped for being off-contract.
|
|
47
|
+
*/
|
|
48
|
+
notes?: string;
|
|
49
|
+
/** What went wrong, when something did. */
|
|
50
|
+
error?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The reasoning tail of a turn that produced no content.
|
|
53
|
+
*
|
|
54
|
+
* A worker that spends its whole budget thinking returns
|
|
55
|
+
* `finish_reason: "length"` with an empty content channel and a full
|
|
56
|
+
* reasoning one. In that case the chain of thought *is* the requested
|
|
57
|
+
* output, and discarding the turn discards the work -- so it is carried
|
|
58
|
+
* here rather than lost with the transcript when the pool is released.
|
|
59
|
+
*/
|
|
60
|
+
reasoning?: string;
|
|
61
|
+
}
|
|
62
|
+
/** The sections, in the order the compaction note writes them. */
|
|
63
|
+
export declare const WORK_DIGEST_SECTIONS: readonly WorkDigestSection[];
|
|
64
|
+
/**
|
|
65
|
+
* Read whatever a worker wrote into a digest.
|
|
66
|
+
*
|
|
67
|
+
* Three readings in order -- a fenced block, the markdown headings, then the
|
|
68
|
+
* prose -- and the last one never fails, which is the point: an off-contract
|
|
69
|
+
* worker is reported as itself rather than as an absence.
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseWorkDigest(text: string | undefined): WorkDigest | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Write a digest in the form the compaction note uses.
|
|
74
|
+
*
|
|
75
|
+
* Empty sections are omitted rather than written blank: a heading with nothing
|
|
76
|
+
* under it reads to the model as "this was considered and there is nothing",
|
|
77
|
+
* which is a claim, and one the worker did not make.
|
|
78
|
+
*/
|
|
79
|
+
export declare function renderWorkDigest(digest: WorkDigest): string;
|
|
80
|
+
/**
|
|
81
|
+
* Fold several workers' digests into one.
|
|
82
|
+
*
|
|
83
|
+
* This is what the reducer does without a model, and what it falls back to when
|
|
84
|
+
* the model call fails. A single digest passes through untouched: with one
|
|
85
|
+
* worker there is nothing to reduce, and a model call there spends a round trip
|
|
86
|
+
* rewriting the answer it was given.
|
|
87
|
+
*
|
|
88
|
+
* Two workers on one prefix reach the same conclusion often, so an identical
|
|
89
|
+
* line is said once with both names on it -- repeating it makes the round look
|
|
90
|
+
* like twice the work it was.
|
|
91
|
+
*/
|
|
92
|
+
export declare function mergeWorkDigests(digests: readonly WorkDigest[]): WorkDigest;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { AgentPluginPackageDiagnostic, AgentPluginPackageDiagnosticScope, AgentPluginPackageLoadReport, AgentPluginPackageManifest, AgentPluginPackageMcpServer, AgentPluginPackageSkill, AgentSkillMetadata, LoadAgentPluginPackagesOptions, LoadedAgentPluginPackage, ParsedAgentSkill, } from "./agent-plugin";
|
|
2
|
+
export { AGENT_PLUGINS_V1_MANIFEST_SCHEMA, AGENT_PLUGINS_V1_MCP_SCHEMA, loadAgentPluginPackages, parseAgentSkillMarkdown, } from "./agent-plugin";
|
|
3
|
+
export type { ResolveAgentPluginPathsOptions } from "./plugin/plugin-config-loader";
|
|
4
|
+
export { discoverPluginModulePaths, getPluginDisplayName, resolveAgentPluginPaths, resolveAndLoadAgentPlugins, resolvePluginConfigSearchPaths, resolvePluginSkillDirectoriesFromPaths, } from "./plugin/plugin-config-loader";
|
|
5
|
+
export type { PluginInitializationFailure, PluginInitializationWarning, PluginLoadDiagnostics, } from "./plugin/plugin-load-report";
|
|
6
|
+
export type { LoadAgentPluginFromPathOptions } from "./plugin/plugin-loader";
|
|
7
|
+
export { loadAgentPluginFromPath, loadAgentPluginsFromPaths, loadAgentPluginsFromPathsWithDiagnostics, } from "./plugin/plugin-loader";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FetchLike } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
2
|
+
import type { McpServerClientFactory } from "./types";
|
|
3
|
+
export declare const DEFAULT_MCP_CONNECT_TIMEOUT_MS = 3000;
|
|
4
|
+
export declare const DEFAULT_HTTP_MCP_CONNECT_TIMEOUT_MS = 10000;
|
|
5
|
+
export interface DefaultMcpServerClientFactoryOptions {
|
|
6
|
+
settingsPath?: string;
|
|
7
|
+
clientName?: string;
|
|
8
|
+
clientVersion?: string;
|
|
9
|
+
fetch?: FetchLike;
|
|
10
|
+
/** Keep literal configured headers on the declared MCP origin only. */
|
|
11
|
+
restrictConfiguredHeadersToOrigin?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ProbeMcpServerConnectionOptions extends Omit<DefaultMcpServerClientFactoryOptions, "settingsPath"> {
|
|
14
|
+
serverName: string;
|
|
15
|
+
filePath?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ProbeMcpServerConnectionResult {
|
|
18
|
+
serverName: string;
|
|
19
|
+
connected: boolean;
|
|
20
|
+
authorizationRequired: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createDefaultMcpServerClientFactory(options?: DefaultMcpServerClientFactoryOptions): McpServerClientFactory;
|
|
24
|
+
/**
|
|
25
|
+
* Passively verifies a configured remote MCP endpoint. This may use or refresh
|
|
26
|
+
* existing credentials, but it never starts an interactive OAuth redirect.
|
|
27
|
+
*/
|
|
28
|
+
export declare function probeMcpServerConnection(options: ProbeMcpServerConnectionOptions): Promise<ProbeMcpServerConnectionResult>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { BasicLogger } from "@cerebriline/shared";
|
|
2
|
+
import type { McpManager, McpServerOAuthClientConfig, McpServerOAuthState, McpServerOAuthStatus, McpServerRegistration } from "./types";
|
|
3
|
+
export interface McpSettingsFile {
|
|
4
|
+
mcpServers: Record<string, Omit<McpServerRegistration, "name">>;
|
|
5
|
+
}
|
|
6
|
+
export interface LoadMcpSettingsOptions {
|
|
7
|
+
filePath?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateMcpServerOAuthStateOptions extends LoadMcpSettingsOptions {
|
|
10
|
+
/**
|
|
11
|
+
* When present, only update OAuth state while the server still has this
|
|
12
|
+
* configured client. `null` asserts that dynamic registration is still in use.
|
|
13
|
+
*/
|
|
14
|
+
expectedOAuthClient?: McpServerOAuthClientConfig | null;
|
|
15
|
+
}
|
|
16
|
+
export interface RegisterMcpServersFromSettingsOptions {
|
|
17
|
+
filePath?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SetMcpServerDisabledOptions {
|
|
20
|
+
filePath?: string;
|
|
21
|
+
name: string;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface McpSettingsLockOptions {
|
|
25
|
+
/** Maximum time to wait for the lock before failing. Defaults to 10 seconds. */
|
|
26
|
+
timeoutMs?: number;
|
|
27
|
+
/** Optional host logger; stale-lock takeover is logged as severity=warn. */
|
|
28
|
+
logger?: BasicLogger;
|
|
29
|
+
}
|
|
30
|
+
export type McpSettingsMutator<T> = (settings: Record<string, unknown>) => T;
|
|
31
|
+
export declare class McpSettingsUpdateSkippedError extends Error {
|
|
32
|
+
constructor(message: string);
|
|
33
|
+
}
|
|
34
|
+
export declare class McpOAuthClientChangedError extends Error {
|
|
35
|
+
constructor(serverName: string);
|
|
36
|
+
}
|
|
37
|
+
export declare class McpSettingsLockTimeoutError extends Error {
|
|
38
|
+
constructor(message: string);
|
|
39
|
+
}
|
|
40
|
+
export declare class McpSettingsMutatorPurityError extends Error {
|
|
41
|
+
constructor(message: string);
|
|
42
|
+
}
|
|
43
|
+
export declare function resolveDefaultMcpSettingsPath(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Locked MCP settings read-modify-write that blocks the event loop (via
|
|
46
|
+
* `Atomics.wait`) while acquiring the lock.
|
|
47
|
+
*
|
|
48
|
+
* Prefer {@link updateMcpSettingsFile}: async acquisition keeps the event loop
|
|
49
|
+
* free and behaves identically otherwise.
|
|
50
|
+
*
|
|
51
|
+
* TODO: Delete once all callers migrate to {@link updateMcpSettingsFile}.
|
|
52
|
+
*
|
|
53
|
+
* The mutator is synchronous and may be called more than once with the same
|
|
54
|
+
* input to verify it is pure/deterministic. Compute any I/O, logging, network,
|
|
55
|
+
* timestamp, or random values before calling and close over them. Return a value
|
|
56
|
+
* only for a successful update; throw McpSettingsUpdateSkippedError to skip.
|
|
57
|
+
*/
|
|
58
|
+
export declare function updateMcpSettingsFileSync<T>(filePath: string, mutator: McpSettingsMutator<T>, options?: McpSettingsLockOptions): T;
|
|
59
|
+
/**
|
|
60
|
+
* Locked MCP settings read-modify-write that yields the event loop while
|
|
61
|
+
* acquiring the lock, so concurrent work on the same loop keeps running.
|
|
62
|
+
*
|
|
63
|
+
* The mutator is synchronous and may be called more than once with the same
|
|
64
|
+
* input to verify it is pure/deterministic. Compute any I/O, logging, network,
|
|
65
|
+
* timestamp, or random values before calling and close over them. The lock is
|
|
66
|
+
* held only across the synchronous mutation, never across an `await`. Return a
|
|
67
|
+
* value only for a successful update; throw McpSettingsUpdateSkippedError to skip.
|
|
68
|
+
*/
|
|
69
|
+
export declare function updateMcpSettingsFile<T>(filePath: string, mutator: McpSettingsMutator<T>, options?: McpSettingsLockOptions): Promise<T>;
|
|
70
|
+
export declare function loadMcpSettingsFile(options?: LoadMcpSettingsOptions): McpSettingsFile;
|
|
71
|
+
export declare function normalizeMcpServerOAuthState(value: McpServerOAuthState | undefined): McpServerOAuthState | undefined;
|
|
72
|
+
export declare function hasMcpSettingsFile(options?: LoadMcpSettingsOptions): boolean;
|
|
73
|
+
export declare function resolveMcpServerRegistrations(options?: LoadMcpSettingsOptions): McpServerRegistration[];
|
|
74
|
+
/**
|
|
75
|
+
* Parses one raw MCP settings entry without requiring sibling entries to be
|
|
76
|
+
* valid. Hosts with an editable settings UI can use this to keep healthy and
|
|
77
|
+
* repairable entries visible when a hand-edited sibling is malformed.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseMcpServerRegistration(name: string, value: unknown): McpServerRegistration;
|
|
80
|
+
/** Resolves one configured server without requiring sibling entries to parse. */
|
|
81
|
+
export declare function resolveMcpServerRegistration(serverName: string, options?: LoadMcpSettingsOptions): McpServerRegistration | undefined;
|
|
82
|
+
export declare function setMcpServerDisabled(options: SetMcpServerDisabledOptions): void;
|
|
83
|
+
export declare function getMcpServerOAuthState(serverName: string, options?: LoadMcpSettingsOptions): McpServerOAuthState | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Scoped read-modify-write of one server's `oauth` block that blocks the event
|
|
86
|
+
* loop while acquiring the lock.
|
|
87
|
+
*
|
|
88
|
+
* Prefer {@link updateMcpServerOAuthStateAsync}.
|
|
89
|
+
*
|
|
90
|
+
* TODO: Delete once all callers migrate to {@link updateMcpServerOAuthStateAsync}.
|
|
91
|
+
*/
|
|
92
|
+
export declare function updateMcpServerOAuthState(serverName: string, updater: (current: McpServerOAuthState) => McpServerOAuthState, options?: UpdateMcpServerOAuthStateOptions): McpServerOAuthState;
|
|
93
|
+
/**
|
|
94
|
+
* Scoped read-modify-write of one server's `oauth` block that yields the event
|
|
95
|
+
* loop while acquiring the lock. The updater is synchronous and pure; it
|
|
96
|
+
* receives the server's current OAuth state and returns the next state.
|
|
97
|
+
*/
|
|
98
|
+
export declare function updateMcpServerOAuthStateAsync(serverName: string, updater: (current: McpServerOAuthState) => McpServerOAuthState, options?: UpdateMcpServerOAuthStateOptions): Promise<McpServerOAuthState>;
|
|
99
|
+
export declare function listMcpServerOAuthStatuses(options?: LoadMcpSettingsOptions): McpServerOAuthStatus[];
|
|
100
|
+
/** Calculates OAuth status for one already-parsed registration. */
|
|
101
|
+
export declare function getMcpServerOAuthStatus(registration: McpServerRegistration): McpServerOAuthStatus;
|
|
102
|
+
export declare function registerMcpServersFromSettingsFile(manager: Pick<McpManager, "registerServer">, options?: RegisterMcpServersFromSettingsOptions): Promise<McpServerRegistration[]>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { DefaultMcpServerClientFactoryOptions, ProbeMcpServerConnectionOptions, ProbeMcpServerConnectionResult, } from "./client";
|
|
2
|
+
export { createDefaultMcpServerClientFactory, DEFAULT_MCP_CONNECT_TIMEOUT_MS, probeMcpServerConnection, } from "./client";
|
|
3
|
+
export type { LoadMcpSettingsOptions, McpSettingsFile, McpSettingsLockOptions, McpSettingsMutator, RegisterMcpServersFromSettingsOptions, SetMcpServerDisabledOptions, UpdateMcpServerOAuthStateOptions, } from "./config-loader";
|
|
4
|
+
export { getMcpServerOAuthState, getMcpServerOAuthStatus, hasMcpSettingsFile, listMcpServerOAuthStatuses, loadMcpSettingsFile, McpOAuthClientChangedError, McpSettingsLockTimeoutError, McpSettingsMutatorPurityError, McpSettingsUpdateSkippedError, parseMcpServerRegistration, registerMcpServersFromSettingsFile, resolveDefaultMcpSettingsPath, resolveMcpServerRegistration, resolveMcpServerRegistrations, setMcpServerDisabled, updateMcpServerOAuthState, updateMcpServerOAuthStateAsync, updateMcpSettingsFile, updateMcpSettingsFileSync, } from "./config-loader";
|
|
5
|
+
export { InMemoryMcpManager } from "./manager";
|
|
6
|
+
export { defaultMcpToolNameTransform } from "./name-transform";
|
|
7
|
+
export type { AuthorizeMcpServerOAuthOptions, AuthorizeMcpServerOAuthResult, CreateMcpOAuthProviderContextOptions, McpOAuthProviderContext, } from "./oauth";
|
|
8
|
+
export { authorizeMcpServerOAuth } from "./oauth";
|
|
9
|
+
export type { PluginMcpServerResolution } from "./plugin-server-registration";
|
|
10
|
+
export { normalizePluginMcpServerRegistration, resolvePluginMcpServerRegistrations, } from "./plugin-server-registration";
|
|
11
|
+
export type { CreateDisabledMcpToolPoliciesOptions, CreateDisabledMcpToolPolicyOptions, } from "./policies";
|
|
12
|
+
export { createDisabledMcpToolPolicies, createDisabledMcpToolPolicy, } from "./policies";
|
|
13
|
+
export { augmentMcpTimeoutError } from "./timeout";
|
|
14
|
+
export { createMcpTools } from "./tools";
|
|
15
|
+
export type { CreateMcpToolsOptions, McpConnectionStatus, McpManager, McpManagerOptions, McpServerClient, McpServerClientFactory, McpServerOAuthClientConfig, McpServerOAuthState, McpServerOAuthStatus, McpServerRegistration, McpServerSnapshot, McpServerTransportConfig, McpSseTransportConfig, McpStdioTransportConfig, McpStreamableHttpTransportConfig, McpToolCallRequest, McpToolCallResult, McpToolDescriptor, McpToolNameTransform, McpToolProvider, } from "./types";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { McpManager, McpManagerOptions, McpServerRegistration, McpServerSnapshot, McpToolCallRequest, McpToolCallResult, McpToolDescriptor } from "./types";
|
|
2
|
+
export declare class InMemoryMcpManager implements McpManager {
|
|
3
|
+
private readonly toolsCacheTtlMs;
|
|
4
|
+
private readonly clientFactory;
|
|
5
|
+
private readonly servers;
|
|
6
|
+
private readonly operationLocks;
|
|
7
|
+
constructor(options: McpManagerOptions);
|
|
8
|
+
registerServer(registration: McpServerRegistration): Promise<void>;
|
|
9
|
+
unregisterServer(serverName: string): Promise<void>;
|
|
10
|
+
connectServer(serverName: string): Promise<void>;
|
|
11
|
+
disconnectServer(serverName: string): Promise<void>;
|
|
12
|
+
setServerDisabled(serverName: string, disabled: boolean): Promise<void>;
|
|
13
|
+
listServers(): readonly McpServerSnapshot[];
|
|
14
|
+
listTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
15
|
+
refreshTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
16
|
+
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
17
|
+
dispose(): Promise<void>;
|
|
18
|
+
private ensureConnectedClient;
|
|
19
|
+
private connectState;
|
|
20
|
+
private disconnectState;
|
|
21
|
+
private requireServer;
|
|
22
|
+
private runExclusive;
|
|
23
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
2
|
+
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
3
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
4
|
+
import type { OAuthClientInformationMixed } from "@modelcontextprotocol/sdk/shared/auth.js";
|
|
5
|
+
import type { FetchLike } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
6
|
+
import { type OAuthServerCloseInfo, type OAuthServerListeningInfo } from "../../auth/server";
|
|
7
|
+
import type { McpServerOAuthClientConfig, McpServerRegistration } from "./types";
|
|
8
|
+
export type McpSdkAuthCapableTransport = SSEClientTransport | StreamableHTTPClientTransport;
|
|
9
|
+
export declare function createOriginBoundMcpHeadersFetch(input: {
|
|
10
|
+
endpointUrl: string;
|
|
11
|
+
configuredHeaders: Record<string, string>;
|
|
12
|
+
baseFetch?: FetchLike;
|
|
13
|
+
}): FetchLike;
|
|
14
|
+
export interface CreateMcpOAuthProviderContextOptions {
|
|
15
|
+
settingsPath?: string;
|
|
16
|
+
serverName: string;
|
|
17
|
+
redirectUrl: string;
|
|
18
|
+
onAuthorizationUrl?: (url: string) => void | Promise<void>;
|
|
19
|
+
clientInformation?: OAuthClientInformationMixed;
|
|
20
|
+
}
|
|
21
|
+
export interface McpOAuthProviderContext {
|
|
22
|
+
provider: OAuthClientProvider;
|
|
23
|
+
getLastAuthorizationUrl(): string | undefined;
|
|
24
|
+
getLastOAuthState(): string | undefined;
|
|
25
|
+
resetInteractiveState(): Promise<void>;
|
|
26
|
+
markError(errorMessage: string): Promise<void>;
|
|
27
|
+
markConnectionError(errorMessage: string): Promise<void>;
|
|
28
|
+
markAuthorizationRequired(errorMessage: string): Promise<void>;
|
|
29
|
+
clearError(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export interface AuthorizeMcpServerOAuthOptions {
|
|
32
|
+
serverName: string;
|
|
33
|
+
filePath?: string;
|
|
34
|
+
clientName?: string;
|
|
35
|
+
clientVersion?: string;
|
|
36
|
+
fetch?: FetchLike;
|
|
37
|
+
openUrl?: (url: string) => void | Promise<void>;
|
|
38
|
+
callbackHost?: string;
|
|
39
|
+
callbackPorts?: number[];
|
|
40
|
+
callbackPath?: string;
|
|
41
|
+
timeoutMs?: number;
|
|
42
|
+
successHtml?: string;
|
|
43
|
+
onServerListening?: (info: OAuthServerListeningInfo) => void | Promise<void>;
|
|
44
|
+
onServerClose?: (info: OAuthServerCloseInfo) => void | Promise<void>;
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}
|
|
47
|
+
export interface AuthorizeMcpServerOAuthResult {
|
|
48
|
+
serverName: string;
|
|
49
|
+
authorized: true;
|
|
50
|
+
message: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function createMcpOAuthClientInformation(config: McpServerOAuthClientConfig | undefined): OAuthClientInformationMixed | undefined;
|
|
53
|
+
export declare function createMcpOAuthProviderContext(options: CreateMcpOAuthProviderContextOptions): McpOAuthProviderContext;
|
|
54
|
+
export declare function createMcpSdkTransport(input: {
|
|
55
|
+
registration: McpServerRegistration;
|
|
56
|
+
oauthProvider?: OAuthClientProvider;
|
|
57
|
+
fetch?: FetchLike;
|
|
58
|
+
restrictConfiguredHeadersToOrigin?: boolean;
|
|
59
|
+
}): McpSdkAuthCapableTransport;
|
|
60
|
+
/**
|
|
61
|
+
* Recognizes a 401 from a remote MCP server across transports. The streamable
|
|
62
|
+
* HTTP transport (and SSE message POSTs) reject with the typed
|
|
63
|
+
* UnauthorizedError raised at the fetch boundary, but the SSE stream request
|
|
64
|
+
* runs inside EventSource, which consumes the response and reports the HTTP
|
|
65
|
+
* status only through SseError's code.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isMcpUnauthorizedError(error: unknown): boolean;
|
|
68
|
+
export declare function authorizeMcpServerOAuth(options: AuthorizeMcpServerOAuthOptions): Promise<AuthorizeMcpServerOAuthResult>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentExtensionMcpServer } from "@cerebriline/shared";
|
|
2
|
+
import type { McpServerRegistration } from "./types";
|
|
3
|
+
export interface PluginMcpServerResolution<TOwner> {
|
|
4
|
+
owner: TOwner;
|
|
5
|
+
name: string;
|
|
6
|
+
registration?: McpServerRegistration;
|
|
7
|
+
loadError?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function normalizePluginMcpServerRegistration(server: AgentExtensionMcpServer): {
|
|
10
|
+
name: string;
|
|
11
|
+
registration?: McpServerRegistration;
|
|
12
|
+
loadError?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function resolvePluginMcpServerRegistrations<TOwner>(servers: readonly {
|
|
15
|
+
server: AgentExtensionMcpServer;
|
|
16
|
+
owner: TOwner;
|
|
17
|
+
ownerLabel?: string;
|
|
18
|
+
}[]): PluginMcpServerResolution<TOwner>[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToolPolicy } from "@cerebriline/shared";
|
|
2
|
+
import type { McpToolNameTransform } from "./types";
|
|
3
|
+
export interface CreateDisabledMcpToolPolicyOptions {
|
|
4
|
+
serverName: string;
|
|
5
|
+
toolName: string;
|
|
6
|
+
nameTransform?: McpToolNameTransform;
|
|
7
|
+
}
|
|
8
|
+
export interface CreateDisabledMcpToolPoliciesOptions {
|
|
9
|
+
serverName: string;
|
|
10
|
+
toolNames: readonly string[];
|
|
11
|
+
nameTransform?: McpToolNameTransform;
|
|
12
|
+
}
|
|
13
|
+
export declare function createDisabledMcpToolPolicy(options: CreateDisabledMcpToolPolicyOptions): Record<string, ToolPolicy>;
|
|
14
|
+
export declare function createDisabledMcpToolPolicies(options: CreateDisabledMcpToolPoliciesOptions): Record<string, ToolPolicy>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { McpServerTransportConfig, McpStdioTransportConfig, McpStreamableHttpTransportConfig } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Recognizes the exact no-option `npx mcp-remote <url>` proxy shape emitted by
|
|
4
|
+
* older marketplace entries. Cline has a native Streamable HTTP transport, so
|
|
5
|
+
* spawning the proxy would duplicate OAuth handling and let the child process
|
|
6
|
+
* open a browser as a side effect of merely enabling the server.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveMcpRemoteProxyTransport(transport: McpStdioTransportConfig): McpStreamableHttpTransportConfig | undefined;
|
|
9
|
+
export declare function resolveNativeMcpTransport(transport: McpServerTransportConfig): McpServerTransportConfig;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { AgentToolContext } from "@cerebriline/shared";
|
|
2
|
+
export interface McpToolDescriptor {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
inputSchema: Record<string, unknown>;
|
|
6
|
+
/** The server's `annotations.readOnlyHint`: the tool does not modify its environment. */
|
|
7
|
+
readOnlyHint?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface McpToolCallRequest {
|
|
10
|
+
serverName: string;
|
|
11
|
+
toolName: string;
|
|
12
|
+
arguments?: Record<string, unknown>;
|
|
13
|
+
context?: AgentToolContext;
|
|
14
|
+
}
|
|
15
|
+
export type McpToolCallResult = unknown;
|
|
16
|
+
export interface McpToolProvider {
|
|
17
|
+
listTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
18
|
+
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
19
|
+
}
|
|
20
|
+
export type McpToolNameTransform = (input: {
|
|
21
|
+
serverName: string;
|
|
22
|
+
toolName: string;
|
|
23
|
+
}) => string;
|
|
24
|
+
export interface CreateMcpToolsOptions {
|
|
25
|
+
serverName: string;
|
|
26
|
+
provider: McpToolProvider;
|
|
27
|
+
nameTransform?: McpToolNameTransform;
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
retryable?: boolean;
|
|
30
|
+
maxRetries?: number;
|
|
31
|
+
}
|
|
32
|
+
export type McpConnectionStatus = "disconnected" | "connecting" | "connected";
|
|
33
|
+
export interface McpStdioTransportConfig {
|
|
34
|
+
type: "stdio";
|
|
35
|
+
command: string;
|
|
36
|
+
args?: string[];
|
|
37
|
+
cwd?: string;
|
|
38
|
+
env?: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
export interface McpSseTransportConfig {
|
|
41
|
+
type: "sse";
|
|
42
|
+
url: string;
|
|
43
|
+
headers?: Record<string, string>;
|
|
44
|
+
}
|
|
45
|
+
export interface McpStreamableHttpTransportConfig {
|
|
46
|
+
type: "streamableHttp";
|
|
47
|
+
url: string;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
}
|
|
50
|
+
export type McpServerTransportConfig = McpStdioTransportConfig | McpSseTransportConfig | McpStreamableHttpTransportConfig;
|
|
51
|
+
export interface McpServerOAuthState {
|
|
52
|
+
clientInformation?: Record<string, unknown>;
|
|
53
|
+
tokens?: Record<string, unknown>;
|
|
54
|
+
codeVerifier?: string;
|
|
55
|
+
discoveryState?: Record<string, unknown>;
|
|
56
|
+
redirectUrl?: string;
|
|
57
|
+
lastError?: string;
|
|
58
|
+
lastAuthenticatedAt?: number;
|
|
59
|
+
authorizationRequired?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface McpServerOAuthClientConfig {
|
|
62
|
+
clientId: string;
|
|
63
|
+
clientSecret?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface McpServerOAuthClientConfig {
|
|
66
|
+
clientId: string;
|
|
67
|
+
clientSecret?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface McpServerRegistration {
|
|
70
|
+
name: string;
|
|
71
|
+
transport: McpServerTransportConfig;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Per-server request timeout in seconds, from the `timeout` field in
|
|
75
|
+
* cline_mcp_settings.json. Undefined means the shared default for ordinary
|
|
76
|
+
* requests; the stdio client uses its default connect budget for
|
|
77
|
+
* initialize until a finite timeout is explicitly configured. Registrations are
|
|
78
|
+
* resolved when the runtime is built, so changes take effect on the next
|
|
79
|
+
* session.
|
|
80
|
+
*/
|
|
81
|
+
timeoutSeconds?: number;
|
|
82
|
+
metadata?: Record<string, unknown>;
|
|
83
|
+
oauthClient?: McpServerOAuthClientConfig;
|
|
84
|
+
oauth?: McpServerOAuthState;
|
|
85
|
+
}
|
|
86
|
+
export interface McpServerSnapshot {
|
|
87
|
+
name: string;
|
|
88
|
+
status: McpConnectionStatus;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
lastError?: string;
|
|
91
|
+
toolCount: number;
|
|
92
|
+
updatedAt: number;
|
|
93
|
+
metadata?: Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
export interface McpServerClient {
|
|
96
|
+
connect(): Promise<void>;
|
|
97
|
+
disconnect(): Promise<void>;
|
|
98
|
+
listTools(): Promise<readonly McpToolDescriptor[]>;
|
|
99
|
+
callTool(request: {
|
|
100
|
+
name: string;
|
|
101
|
+
arguments?: Record<string, unknown>;
|
|
102
|
+
context?: AgentToolContext;
|
|
103
|
+
}): Promise<McpToolCallResult>;
|
|
104
|
+
}
|
|
105
|
+
export type McpServerClientFactory = (registration: McpServerRegistration) => Promise<McpServerClient> | McpServerClient;
|
|
106
|
+
export interface McpServerOAuthStatus {
|
|
107
|
+
serverName: string;
|
|
108
|
+
oauthSupported: boolean;
|
|
109
|
+
oauthConfigured: boolean;
|
|
110
|
+
authorizationRequired: boolean;
|
|
111
|
+
lastError?: string;
|
|
112
|
+
lastAuthenticatedAt?: number;
|
|
113
|
+
}
|
|
114
|
+
export interface McpManagerOptions {
|
|
115
|
+
clientFactory: McpServerClientFactory;
|
|
116
|
+
/**
|
|
117
|
+
* Cache TTL for tools/list responses.
|
|
118
|
+
* A short cache avoids repeated list requests while keeping server metadata fresh.
|
|
119
|
+
* @default 5000
|
|
120
|
+
*/
|
|
121
|
+
toolsCacheTtlMs?: number;
|
|
122
|
+
}
|
|
123
|
+
export interface McpManager extends McpToolProvider {
|
|
124
|
+
registerServer(registration: McpServerRegistration): Promise<void>;
|
|
125
|
+
unregisterServer(serverName: string): Promise<void>;
|
|
126
|
+
connectServer(serverName: string): Promise<void>;
|
|
127
|
+
disconnectServer(serverName: string): Promise<void>;
|
|
128
|
+
setServerDisabled(serverName: string, disabled: boolean): Promise<void>;
|
|
129
|
+
listServers(): readonly McpServerSnapshot[];
|
|
130
|
+
refreshTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
131
|
+
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
132
|
+
dispose(): Promise<void>;
|
|
133
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AgentConfig, PluginSetupContext, WorkspaceInfo } from "@cerebriline/shared";
|
|
2
|
+
import type { PluginLoadDiagnostics } from "./plugin-load-report";
|
|
3
|
+
import type { PluginTargeting } from "./plugin-targeting";
|
|
4
|
+
export { getPluginDisplayName } from "@cerebriline/shared/storage";
|
|
5
|
+
type AgentPlugin = NonNullable<AgentConfig["extensions"]>[number];
|
|
6
|
+
export declare function resolvePluginConfigSearchPaths(workspacePath?: string): string[];
|
|
7
|
+
export declare function discoverPluginModulePaths(directoryPath: string): string[];
|
|
8
|
+
export interface ResolveAgentPluginPathsOptions {
|
|
9
|
+
pluginPaths?: ReadonlyArray<string>;
|
|
10
|
+
workspacePath?: string;
|
|
11
|
+
cwd?: string;
|
|
12
|
+
includeDisabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function resolveAgentPluginPaths(options?: ResolveAgentPluginPathsOptions): string[];
|
|
15
|
+
export declare function resolvePluginSkillDirectoriesFromPaths(pluginPaths: ReadonlyArray<string>): string[];
|
|
16
|
+
export declare function resolveAgentPluginSkillDirectories(options?: ResolveAgentPluginPathsOptions): string[];
|
|
17
|
+
export interface ResolveAndLoadAgentPluginsOptions extends ResolveAgentPluginPathsOptions, PluginTargeting {
|
|
18
|
+
mode?: "sandbox" | "in_process";
|
|
19
|
+
exportName?: string;
|
|
20
|
+
importTimeoutMs?: number;
|
|
21
|
+
hookTimeoutMs?: number;
|
|
22
|
+
contributionTimeoutMs?: number;
|
|
23
|
+
onEvent?: (event: {
|
|
24
|
+
name: string;
|
|
25
|
+
payload?: unknown;
|
|
26
|
+
}) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Structured workspace and git metadata. Forwarded to sandboxed plugins
|
|
29
|
+
* via PluginSetupCtx.workspaceInfo and made available to in-process plugins
|
|
30
|
+
* in the extension context.
|
|
31
|
+
*/
|
|
32
|
+
workspaceInfo?: WorkspaceInfo;
|
|
33
|
+
session?: PluginSetupContext["session"];
|
|
34
|
+
client?: PluginSetupContext["client"];
|
|
35
|
+
user?: PluginSetupContext["user"];
|
|
36
|
+
automation?: PluginSetupContext["automation"];
|
|
37
|
+
logger?: PluginSetupContext["logger"];
|
|
38
|
+
telemetry?: PluginSetupContext["telemetry"];
|
|
39
|
+
}
|
|
40
|
+
export declare function resolveAndLoadAgentPlugins(options?: ResolveAndLoadAgentPluginsOptions): Promise<{
|
|
41
|
+
extensions: AgentPlugin[];
|
|
42
|
+
pluginPaths: string[];
|
|
43
|
+
shutdown?: () => Promise<void>;
|
|
44
|
+
} & PluginLoadDiagnostics>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PluginInitializationFailure {
|
|
2
|
+
pluginPath: string;
|
|
3
|
+
pluginName?: string;
|
|
4
|
+
phase: "load" | "setup";
|
|
5
|
+
message: string;
|
|
6
|
+
stack?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PluginInitializationWarning {
|
|
9
|
+
type: "duplicate_plugin_override";
|
|
10
|
+
pluginPath: string;
|
|
11
|
+
pluginName: string;
|
|
12
|
+
overriddenPluginPath: string;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PluginLoadDiagnostics {
|
|
16
|
+
failures: PluginInitializationFailure[];
|
|
17
|
+
warnings: PluginInitializationWarning[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentExtension, PluginSetupContext } from "@cerebriline/shared";
|
|
2
|
+
import type { PluginInitializationFailure, PluginInitializationWarning } from "./plugin-load-report";
|
|
3
|
+
import { type PluginTargeting } from "./plugin-targeting";
|
|
4
|
+
export interface LoadAgentPluginFromPathOptions {
|
|
5
|
+
exportName?: string;
|
|
6
|
+
cwd?: string;
|
|
7
|
+
useCache?: boolean;
|
|
8
|
+
session?: PluginSetupContext["session"];
|
|
9
|
+
client?: PluginSetupContext["client"];
|
|
10
|
+
user?: PluginSetupContext["user"];
|
|
11
|
+
workspaceInfo?: PluginSetupContext["workspaceInfo"];
|
|
12
|
+
automation?: PluginSetupContext["automation"];
|
|
13
|
+
logger?: PluginSetupContext["logger"];
|
|
14
|
+
telemetry?: PluginSetupContext["telemetry"];
|
|
15
|
+
}
|
|
16
|
+
export declare function loadAgentPluginFromPath(pluginPath: string, options?: LoadAgentPluginFromPathOptions): Promise<AgentExtension>;
|
|
17
|
+
export declare function loadAgentPluginsFromPaths(pluginPaths: string[], options?: LoadAgentPluginFromPathOptions & PluginTargeting): Promise<AgentExtension[]>;
|
|
18
|
+
export declare function loadAgentPluginsFromPathsWithDiagnostics(pluginPaths: string[], options?: LoadAgentPluginFromPathOptions & PluginTargeting): Promise<{
|
|
19
|
+
plugins: AgentExtension[];
|
|
20
|
+
pluginPaths: string[];
|
|
21
|
+
failures: PluginInitializationFailure[];
|
|
22
|
+
warnings: PluginInitializationWarning[];
|
|
23
|
+
}>;
|