@vibesdotdev/external 0.0.0-stage → 1.0.0-rc.0
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 +18 -0
- package/README.md +68 -2
- package/REFERENCE.md +217 -0
- package/dist/acp/index.d.ts +28 -0
- package/dist/acp/index.d.ts.map +1 -0
- package/dist/acp/index.js +31 -0
- package/dist/acp/index.js.map +1 -0
- package/dist/ambient/agent-roster-heartbeat.d.ts +67 -0
- package/dist/ambient/agent-roster-heartbeat.d.ts.map +1 -0
- package/dist/ambient/agent-roster-heartbeat.js +257 -0
- package/dist/ambient/agent-roster-heartbeat.js.map +1 -0
- package/dist/ambient/attempt.d.ts +19 -0
- package/dist/ambient/attempt.d.ts.map +1 -0
- package/dist/ambient/attempt.js +39 -0
- package/dist/ambient/attempt.js.map +1 -0
- package/dist/ambient/cloud-agent-roster-provider.impl.d.ts +13 -0
- package/dist/ambient/cloud-agent-roster-provider.impl.d.ts.map +1 -0
- package/dist/ambient/cloud-agent-roster-provider.impl.js +71 -0
- package/dist/ambient/cloud-agent-roster-provider.impl.js.map +1 -0
- package/dist/ambient/cloud-authenticated-json.d.ts +69 -0
- package/dist/ambient/cloud-authenticated-json.d.ts.map +1 -0
- package/dist/ambient/cloud-authenticated-json.js +108 -0
- package/dist/ambient/cloud-authenticated-json.js.map +1 -0
- package/dist/ambient/cloud-touch-projection.impl.d.ts +74 -0
- package/dist/ambient/cloud-touch-projection.impl.d.ts.map +1 -0
- package/dist/ambient/cloud-touch-projection.impl.js +225 -0
- package/dist/ambient/cloud-touch-projection.impl.js.map +1 -0
- package/dist/ambient/collaboration-settings.d.ts +50 -0
- package/dist/ambient/collaboration-settings.d.ts.map +1 -0
- package/dist/ambient/collaboration-settings.js +57 -0
- package/dist/ambient/collaboration-settings.js.map +1 -0
- package/dist/ambient/collision-notice.d.ts +41 -0
- package/dist/ambient/collision-notice.d.ts.map +1 -0
- package/dist/ambient/collision-notice.js +104 -0
- package/dist/ambient/collision-notice.js.map +1 -0
- package/dist/ambient/default-collision-filter.impl.d.ts +19 -0
- package/dist/ambient/default-collision-filter.impl.d.ts.map +1 -0
- package/dist/ambient/default-collision-filter.impl.js +53 -0
- package/dist/ambient/default-collision-filter.impl.js.map +1 -0
- package/dist/ambient/default-notice-formatter.impl.d.ts +4 -0
- package/dist/ambient/default-notice-formatter.impl.d.ts.map +1 -0
- package/dist/ambient/default-notice-formatter.impl.js +38 -0
- package/dist/ambient/default-notice-formatter.impl.js.map +1 -0
- package/dist/ambient/file-access-ambient-drain.impl.d.ts +21 -0
- package/dist/ambient/file-access-ambient-drain.impl.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient-drain.impl.js +53 -0
- package/dist/ambient/file-access-ambient-drain.impl.js.map +1 -0
- package/dist/ambient/file-access-ambient-drain.subscription.descriptor.d.ts +27 -0
- package/dist/ambient/file-access-ambient-drain.subscription.descriptor.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient-drain.subscription.descriptor.js +27 -0
- package/dist/ambient/file-access-ambient-drain.subscription.descriptor.js.map +1 -0
- package/dist/ambient/file-access-ambient-fs.impl.d.ts +45 -0
- package/dist/ambient/file-access-ambient-fs.impl.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient-fs.impl.js +243 -0
- package/dist/ambient/file-access-ambient-fs.impl.js.map +1 -0
- package/dist/ambient/file-access-ambient-fs.subscription.descriptor.d.ts +32 -0
- package/dist/ambient/file-access-ambient-fs.subscription.descriptor.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient-fs.subscription.descriptor.js +39 -0
- package/dist/ambient/file-access-ambient-fs.subscription.descriptor.js.map +1 -0
- package/dist/ambient/file-access-ambient.impl.d.ts +32 -0
- package/dist/ambient/file-access-ambient.impl.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient.impl.js +231 -0
- package/dist/ambient/file-access-ambient.impl.js.map +1 -0
- package/dist/ambient/file-access-ambient.subscription.descriptor.d.ts +31 -0
- package/dist/ambient/file-access-ambient.subscription.descriptor.d.ts.map +1 -0
- package/dist/ambient/file-access-ambient.subscription.descriptor.js +31 -0
- package/dist/ambient/file-access-ambient.subscription.descriptor.js.map +1 -0
- package/dist/ambient/file-access-shared.d.ts +48 -0
- package/dist/ambient/file-access-shared.d.ts.map +1 -0
- package/dist/ambient/file-access-shared.js +59 -0
- package/dist/ambient/file-access-shared.js.map +1 -0
- package/dist/ambient/message-transport.impl.d.ts +47 -0
- package/dist/ambient/message-transport.impl.d.ts.map +1 -0
- package/dist/ambient/message-transport.impl.js +300 -0
- package/dist/ambient/message-transport.impl.js.map +1 -0
- package/dist/ambient/pending-notices.d.ts +11 -0
- package/dist/ambient/pending-notices.d.ts.map +1 -0
- package/dist/ambient/pending-notices.js +24 -0
- package/dist/ambient/pending-notices.js.map +1 -0
- package/dist/ambient/subsystem-overlap.impl.d.ts +60 -0
- package/dist/ambient/subsystem-overlap.impl.d.ts.map +1 -0
- package/dist/ambient/subsystem-overlap.impl.js +127 -0
- package/dist/ambient/subsystem-overlap.impl.js.map +1 -0
- package/dist/cli/dev.external.hooks-install.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.hooks-install.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-install.descriptor.js +27 -0
- package/dist/cli/dev.external.hooks-install.descriptor.js.map +1 -0
- package/dist/cli/dev.external.hooks-install.impl.d.ts +9 -0
- package/dist/cli/dev.external.hooks-install.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-install.impl.js +57 -0
- package/dist/cli/dev.external.hooks-install.impl.js.map +1 -0
- package/dist/cli/dev.external.hooks-list.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.hooks-list.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-list.descriptor.js +16 -0
- package/dist/cli/dev.external.hooks-list.descriptor.js.map +1 -0
- package/dist/cli/dev.external.hooks-list.impl.d.ts +3 -0
- package/dist/cli/dev.external.hooks-list.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-list.impl.js +68 -0
- package/dist/cli/dev.external.hooks-list.impl.js.map +1 -0
- package/dist/cli/dev.external.hooks-uninstall.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.hooks-uninstall.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-uninstall.descriptor.js +30 -0
- package/dist/cli/dev.external.hooks-uninstall.descriptor.js.map +1 -0
- package/dist/cli/dev.external.hooks-uninstall.impl.d.ts +9 -0
- package/dist/cli/dev.external.hooks-uninstall.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks-uninstall.impl.js +59 -0
- package/dist/cli/dev.external.hooks-uninstall.impl.js.map +1 -0
- package/dist/cli/dev.external.hooks.call.descriptor.d.ts +12 -0
- package/dist/cli/dev.external.hooks.call.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks.call.descriptor.js +51 -0
- package/dist/cli/dev.external.hooks.call.descriptor.js.map +1 -0
- package/dist/cli/dev.external.hooks.call.impl.d.ts +6 -0
- package/dist/cli/dev.external.hooks.call.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks.call.impl.js +162 -0
- package/dist/cli/dev.external.hooks.call.impl.js.map +1 -0
- package/dist/cli/dev.external.hooks.descriptor.d.ts +9 -0
- package/dist/cli/dev.external.hooks.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.hooks.descriptor.js +17 -0
- package/dist/cli/dev.external.hooks.descriptor.js.map +1 -0
- package/dist/cli/dev.external.launch.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.launch.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.launch.descriptor.js +31 -0
- package/dist/cli/dev.external.launch.descriptor.js.map +1 -0
- package/dist/cli/dev.external.launch.impl.d.ts +17 -0
- package/dist/cli/dev.external.launch.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.launch.impl.js +137 -0
- package/dist/cli/dev.external.launch.impl.js.map +1 -0
- package/dist/cli/dev.external.presets-apply.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.presets-apply.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-apply.descriptor.js +36 -0
- package/dist/cli/dev.external.presets-apply.descriptor.js.map +1 -0
- package/dist/cli/dev.external.presets-apply.impl.d.ts +3 -0
- package/dist/cli/dev.external.presets-apply.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-apply.impl.js +119 -0
- package/dist/cli/dev.external.presets-apply.impl.js.map +1 -0
- package/dist/cli/dev.external.presets-list.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.presets-list.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-list.descriptor.js +21 -0
- package/dist/cli/dev.external.presets-list.descriptor.js.map +1 -0
- package/dist/cli/dev.external.presets-list.impl.d.ts +3 -0
- package/dist/cli/dev.external.presets-list.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-list.impl.js +33 -0
- package/dist/cli/dev.external.presets-list.impl.js.map +1 -0
- package/dist/cli/dev.external.presets-show.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.presets-show.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-show.descriptor.js +29 -0
- package/dist/cli/dev.external.presets-show.descriptor.js.map +1 -0
- package/dist/cli/dev.external.presets-show.impl.d.ts +7 -0
- package/dist/cli/dev.external.presets-show.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.presets-show.impl.js +39 -0
- package/dist/cli/dev.external.presets-show.impl.js.map +1 -0
- package/dist/cli/dev.external.presets.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.presets.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.presets.descriptor.js +15 -0
- package/dist/cli/dev.external.presets.descriptor.js.map +1 -0
- package/dist/cli/dev.external.setup.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.setup.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.setup.descriptor.js +29 -0
- package/dist/cli/dev.external.setup.descriptor.js.map +1 -0
- package/dist/cli/dev.external.setup.impl.d.ts +3 -0
- package/dist/cli/dev.external.setup.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.setup.impl.js +129 -0
- package/dist/cli/dev.external.setup.impl.js.map +1 -0
- package/dist/cli/dev.external.skills-generate.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.skills-generate.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.skills-generate.descriptor.js +43 -0
- package/dist/cli/dev.external.skills-generate.descriptor.js.map +1 -0
- package/dist/cli/dev.external.skills-generate.impl.consumer.d.ts +3 -0
- package/dist/cli/dev.external.skills-generate.impl.consumer.d.ts.map +1 -0
- package/dist/cli/dev.external.skills-generate.impl.consumer.js +140 -0
- package/dist/cli/dev.external.skills-generate.impl.consumer.js.map +1 -0
- package/dist/cli/dev.external.skills.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.skills.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.skills.descriptor.js +15 -0
- package/dist/cli/dev.external.skills.descriptor.js.map +1 -0
- package/dist/cli/dev.external.status.descriptor.d.ts +7 -0
- package/dist/cli/dev.external.status.descriptor.d.ts.map +1 -0
- package/dist/cli/dev.external.status.descriptor.js +16 -0
- package/dist/cli/dev.external.status.descriptor.js.map +1 -0
- package/dist/cli/dev.external.status.impl.d.ts +24 -0
- package/dist/cli/dev.external.status.impl.d.ts.map +1 -0
- package/dist/cli/dev.external.status.impl.js +165 -0
- package/dist/cli/dev.external.status.impl.js.map +1 -0
- package/dist/cli/launch/launch.cli-group.descriptor.d.ts +4 -0
- package/dist/cli/launch/launch.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/launch/launch.cli-group.descriptor.js +12 -0
- package/dist/cli/launch/launch.cli-group.descriptor.js.map +1 -0
- package/dist/cli/launch/launch.harness.impl.consumer.d.ts +6 -0
- package/dist/cli/launch/launch.harness.impl.consumer.d.ts.map +1 -0
- package/dist/cli/launch/launch.harness.impl.consumer.js +55 -0
- package/dist/cli/launch/launch.harness.impl.consumer.js.map +1 -0
- package/dist/cli/launch/launch.list.descriptor.d.ts +4 -0
- package/dist/cli/launch/launch.list.descriptor.d.ts.map +1 -0
- package/dist/cli/launch/launch.list.descriptor.js +13 -0
- package/dist/cli/launch/launch.list.descriptor.js.map +1 -0
- package/dist/cli/launch/launch.list.impl.consumer.d.ts +7 -0
- package/dist/cli/launch/launch.list.impl.consumer.d.ts.map +1 -0
- package/dist/cli/launch/launch.list.impl.consumer.js +26 -0
- package/dist/cli/launch/launch.list.impl.consumer.js.map +1 -0
- package/dist/cli/launch/launch.logs.descriptor.d.ts +4 -0
- package/dist/cli/launch/launch.logs.descriptor.d.ts.map +1 -0
- package/dist/cli/launch/launch.logs.descriptor.js +30 -0
- package/dist/cli/launch/launch.logs.descriptor.js.map +1 -0
- package/dist/cli/launch/launch.logs.impl.consumer.d.ts +7 -0
- package/dist/cli/launch/launch.logs.impl.consumer.d.ts.map +1 -0
- package/dist/cli/launch/launch.logs.impl.consumer.js +78 -0
- package/dist/cli/launch/launch.logs.impl.consumer.js.map +1 -0
- package/dist/cli/launch/launch.status.descriptor.d.ts +4 -0
- package/dist/cli/launch/launch.status.descriptor.d.ts.map +1 -0
- package/dist/cli/launch/launch.status.descriptor.js +21 -0
- package/dist/cli/launch/launch.status.descriptor.js.map +1 -0
- package/dist/cli/launch/launch.status.impl.consumer.d.ts +7 -0
- package/dist/cli/launch/launch.status.impl.consumer.d.ts.map +1 -0
- package/dist/cli/launch/launch.status.impl.consumer.js +69 -0
- package/dist/cli/launch/launch.status.impl.consumer.js.map +1 -0
- package/dist/cli/plugin.d.ts +4 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +76 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/runtime-projection.d.ts +34 -0
- package/dist/cli/runtime-projection.d.ts.map +1 -0
- package/dist/cli/runtime-projection.js +272 -0
- package/dist/cli/runtime-projection.js.map +1 -0
- package/dist/cli/stdio.d.ts +15 -0
- package/dist/cli/stdio.d.ts.map +1 -0
- package/dist/cli/stdio.js +15 -0
- package/dist/cli/stdio.js.map +1 -0
- package/dist/cli/who.descriptor.d.ts +16 -0
- package/dist/cli/who.descriptor.d.ts.map +1 -0
- package/dist/cli/who.descriptor.js +38 -0
- package/dist/cli/who.descriptor.js.map +1 -0
- package/dist/cli/who.impl.d.ts +16 -0
- package/dist/cli/who.impl.d.ts.map +1 -0
- package/dist/cli/who.impl.js +127 -0
- package/dist/cli/who.impl.js.map +1 -0
- package/dist/client/external-client.d.ts +423 -0
- package/dist/client/external-client.d.ts.map +1 -0
- package/dist/client/external-client.js +979 -0
- package/dist/client/external-client.js.map +1 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +8 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/lifecycle.d.ts +25 -0
- package/dist/client/lifecycle.d.ts.map +1 -0
- package/dist/client/lifecycle.js +134 -0
- package/dist/client/lifecycle.js.map +1 -0
- package/dist/config/binary-detection.d.ts +26 -0
- package/dist/config/binary-detection.d.ts.map +1 -0
- package/dist/config/binary-detection.js +105 -0
- package/dist/config/binary-detection.js.map +1 -0
- package/dist/config/external.config.descriptor.d.ts +11 -0
- package/dist/config/external.config.descriptor.d.ts.map +1 -0
- package/dist/config/external.config.descriptor.js +41 -0
- package/dist/config/external.config.descriptor.js.map +1 -0
- package/dist/config/index.d.ts +10 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +10 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/manifest.d.ts +4696 -0
- package/dist/config/manifest.d.ts.map +1 -0
- package/dist/config/manifest.js +210 -0
- package/dist/config/manifest.js.map +1 -0
- package/dist/config/read.d.ts +13 -0
- package/dist/config/read.d.ts.map +1 -0
- package/dist/config/read.js +20 -0
- package/dist/config/read.js.map +1 -0
- package/dist/consumer.d.ts +15 -0
- package/dist/consumer.d.ts.map +1 -0
- package/dist/consumer.js +15 -0
- package/dist/consumer.js.map +1 -0
- package/dist/detection/base.d.ts +71 -0
- package/dist/detection/base.d.ts.map +1 -0
- package/dist/detection/base.js +115 -0
- package/dist/detection/base.js.map +1 -0
- package/dist/detection/command-probe.d.ts +43 -0
- package/dist/detection/command-probe.d.ts.map +1 -0
- package/dist/detection/command-probe.js +75 -0
- package/dist/detection/command-probe.js.map +1 -0
- package/dist/detection/config-document.d.ts +31 -0
- package/dist/detection/config-document.d.ts.map +1 -0
- package/dist/detection/config-document.js +138 -0
- package/dist/detection/config-document.js.map +1 -0
- package/dist/detection/index.d.ts +11 -0
- package/dist/detection/index.d.ts.map +1 -0
- package/dist/detection/index.js +13 -0
- package/dist/detection/index.js.map +1 -0
- package/dist/detection/manifest-detector-helpers.d.ts +45 -0
- package/dist/detection/manifest-detector-helpers.d.ts.map +1 -0
- package/dist/detection/manifest-detector-helpers.js +198 -0
- package/dist/detection/manifest-detector-helpers.js.map +1 -0
- package/dist/detection/manifest-detector.d.ts +34 -0
- package/dist/detection/manifest-detector.d.ts.map +1 -0
- package/dist/detection/manifest-detector.js +123 -0
- package/dist/detection/manifest-detector.js.map +1 -0
- package/dist/detection/service.d.ts +99 -0
- package/dist/detection/service.d.ts.map +1 -0
- package/dist/detection/service.js +124 -0
- package/dist/detection/service.js.map +1 -0
- package/dist/detection/types.d.ts +113 -0
- package/dist/detection/types.d.ts.map +1 -0
- package/dist/detection/types.js +30 -0
- package/dist/detection/types.js.map +1 -0
- package/dist/dev.external.descriptor.d.ts +9 -0
- package/dist/dev.external.descriptor.d.ts.map +1 -0
- package/dist/dev.external.descriptor.js +17 -0
- package/dist/dev.external.descriptor.js.map +1 -0
- package/dist/docs/external.ambient.docs.descriptor.d.ts +4 -0
- package/dist/docs/external.ambient.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/external.ambient.docs.descriptor.js +109 -0
- package/dist/docs/external.ambient.docs.descriptor.js.map +1 -0
- package/dist/external-adapter/descriptors.d.ts +133 -0
- package/dist/external-adapter/descriptors.d.ts.map +1 -0
- package/dist/external-adapter/descriptors.js +70 -0
- package/dist/external-adapter/descriptors.js.map +1 -0
- package/dist/external-adapter/implementations.d.ts +13 -0
- package/dist/external-adapter/implementations.d.ts.map +1 -0
- package/dist/external-adapter/implementations.js +97 -0
- package/dist/external-adapter/implementations.js.map +1 -0
- package/dist/external-adapter/schemas/adapter.d.ts +66 -0
- package/dist/external-adapter/schemas/adapter.d.ts.map +1 -0
- package/dist/external-adapter/schemas/adapter.js +55 -0
- package/dist/external-adapter/schemas/adapter.js.map +1 -0
- package/dist/external-tool/impl/default-tool.d.ts +201 -0
- package/dist/external-tool/impl/default-tool.d.ts.map +1 -0
- package/dist/external-tool/impl/default-tool.js +243 -0
- package/dist/external-tool/impl/default-tool.js.map +1 -0
- package/dist/external-tool/interfaces/tool.d.ts +102 -0
- package/dist/external-tool/interfaces/tool.d.ts.map +1 -0
- package/dist/external-tool/interfaces/tool.js +2 -0
- package/dist/external-tool/interfaces/tool.js.map +1 -0
- package/dist/external-tool/loader.d.ts +5 -0
- package/dist/external-tool/loader.d.ts.map +1 -0
- package/dist/external-tool/loader.js +8 -0
- package/dist/external-tool/loader.js.map +1 -0
- package/dist/external-tool/path-template.d.ts +54 -0
- package/dist/external-tool/path-template.d.ts.map +1 -0
- package/dist/external-tool/path-template.js +65 -0
- package/dist/external-tool/path-template.js.map +1 -0
- package/dist/external-tool/runtime.d.ts +38 -0
- package/dist/external-tool/runtime.d.ts.map +1 -0
- package/dist/external-tool/runtime.js +89 -0
- package/dist/external-tool/runtime.js.map +1 -0
- package/dist/external-tool/schemas/tool.d.ts +269 -0
- package/dist/external-tool/schemas/tool.d.ts.map +1 -0
- package/dist/external-tool/schemas/tool.js +77 -0
- package/dist/external-tool/schemas/tool.js.map +1 -0
- package/dist/external.plugin.d.ts +4 -0
- package/dist/external.plugin.d.ts.map +1 -0
- package/dist/external.plugin.js +184 -0
- package/dist/external.plugin.js.map +1 -0
- package/dist/harness/agent-host-scope.d.ts +18 -0
- package/dist/harness/agent-host-scope.d.ts.map +1 -0
- package/dist/harness/agent-host-scope.js +30 -0
- package/dist/harness/agent-host-scope.js.map +1 -0
- package/dist/harness/agent-host-settings.d.ts +6 -0
- package/dist/harness/agent-host-settings.d.ts.map +1 -0
- package/dist/harness/agent-host-settings.js +18 -0
- package/dist/harness/agent-host-settings.js.map +1 -0
- package/dist/harness/agent-host.config.descriptor.d.ts +6 -0
- package/dist/harness/agent-host.config.descriptor.d.ts.map +1 -0
- package/dist/harness/agent-host.config.descriptor.js +22 -0
- package/dist/harness/agent-host.config.descriptor.js.map +1 -0
- package/dist/harness/agent-host.d.ts +98 -0
- package/dist/harness/agent-host.d.ts.map +1 -0
- package/dist/harness/agent-host.js +201 -0
- package/dist/harness/agent-host.js.map +1 -0
- package/dist/harness/command-arguments.d.ts +54 -0
- package/dist/harness/command-arguments.d.ts.map +1 -0
- package/dist/harness/command-arguments.js +113 -0
- package/dist/harness/command-arguments.js.map +1 -0
- package/dist/harness/command-execution.d.ts +20 -0
- package/dist/harness/command-execution.d.ts.map +1 -0
- package/dist/harness/command-execution.js +78 -0
- package/dist/harness/command-execution.js.map +1 -0
- package/dist/harness/command-output.d.ts +59 -0
- package/dist/harness/command-output.d.ts.map +1 -0
- package/dist/harness/command-output.js +173 -0
- package/dist/harness/command-output.js.map +1 -0
- package/dist/harness/execution-queue.d.ts +14 -0
- package/dist/harness/execution-queue.d.ts.map +1 -0
- package/dist/harness/execution-queue.js +23 -0
- package/dist/harness/execution-queue.js.map +1 -0
- package/dist/harness/index.d.ts +15 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +12 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/live-tools.d.ts +130 -0
- package/dist/harness/live-tools.d.ts.map +1 -0
- package/dist/harness/live-tools.js +257 -0
- package/dist/harness/live-tools.js.map +1 -0
- package/dist/harness/managed-block.d.ts +34 -0
- package/dist/harness/managed-block.d.ts.map +1 -0
- package/dist/harness/managed-block.js +66 -0
- package/dist/harness/managed-block.js.map +1 -0
- package/dist/harness/markers.d.ts +22 -0
- package/dist/harness/markers.d.ts.map +1 -0
- package/dist/harness/markers.js +28 -0
- package/dist/harness/markers.js.map +1 -0
- package/dist/harness/node.d.ts +6 -0
- package/dist/harness/node.d.ts.map +1 -0
- package/dist/harness/node.js +6 -0
- package/dist/harness/node.js.map +1 -0
- package/dist/harness/prompt.d.ts +54 -0
- package/dist/harness/prompt.d.ts.map +1 -0
- package/dist/harness/prompt.js +78 -0
- package/dist/harness/prompt.js.map +1 -0
- package/dist/harness/prompts/index.d.ts +113 -0
- package/dist/harness/prompts/index.d.ts.map +1 -0
- package/dist/harness/prompts/index.js +5 -0
- package/dist/harness/prompts/index.js.map +1 -0
- package/dist/harness/prompts/static-briefing-note.prompt.descriptor.d.ts +114 -0
- package/dist/harness/prompts/static-briefing-note.prompt.descriptor.d.ts.map +1 -0
- package/dist/harness/prompts/static-briefing-note.prompt.descriptor.js +17 -0
- package/dist/harness/prompts/static-briefing-note.prompt.descriptor.js.map +1 -0
- package/dist/harness/prompts/system-prompt.prompt.descriptor.d.ts +114 -0
- package/dist/harness/prompts/system-prompt.prompt.descriptor.d.ts.map +1 -0
- package/dist/harness/prompts/system-prompt.prompt.descriptor.js +35 -0
- package/dist/harness/prompts/system-prompt.prompt.descriptor.js.map +1 -0
- package/dist/harness/role-prompt.d.ts +12 -0
- package/dist/harness/role-prompt.d.ts.map +1 -0
- package/dist/harness/role-prompt.js +24 -0
- package/dist/harness/role-prompt.js.map +1 -0
- package/dist/harness/runtime-transport.d.ts +89 -0
- package/dist/harness/runtime-transport.d.ts.map +1 -0
- package/dist/harness/runtime-transport.js +356 -0
- package/dist/harness/runtime-transport.js.map +1 -0
- package/dist/harness/schemas/agent-host.d.ts +142 -0
- package/dist/harness/schemas/agent-host.d.ts.map +1 -0
- package/dist/harness/schemas/agent-host.js +26 -0
- package/dist/harness/schemas/agent-host.js.map +1 -0
- package/dist/harness/stdio-sink.d.ts +35 -0
- package/dist/harness/stdio-sink.d.ts.map +1 -0
- package/dist/harness/stdio-sink.js +34 -0
- package/dist/harness/stdio-sink.js.map +1 -0
- package/dist/harness/strip-undefined.d.ts +9 -0
- package/dist/harness/strip-undefined.d.ts.map +1 -0
- package/dist/harness/strip-undefined.js +11 -0
- package/dist/harness/strip-undefined.js.map +1 -0
- package/dist/harness/tool-projection.d.ts +130 -0
- package/dist/harness/tool-projection.d.ts.map +1 -0
- package/dist/harness/tool-projection.js +195 -0
- package/dist/harness/tool-projection.js.map +1 -0
- package/dist/harness/validation-errors.d.ts +11 -0
- package/dist/harness/validation-errors.d.ts.map +1 -0
- package/dist/harness/validation-errors.js +32 -0
- package/dist/harness/validation-errors.js.map +1 -0
- package/dist/hooks/bounded-payload.d.ts +39 -0
- package/dist/hooks/bounded-payload.d.ts.map +1 -0
- package/dist/hooks/bounded-payload.js +70 -0
- package/dist/hooks/bounded-payload.js.map +1 -0
- package/dist/hooks/bridge.d.ts +34 -0
- package/dist/hooks/bridge.d.ts.map +1 -0
- package/dist/hooks/bridge.js +86 -0
- package/dist/hooks/bridge.js.map +1 -0
- package/dist/hooks/call.d.ts +298 -0
- package/dist/hooks/call.d.ts.map +1 -0
- package/dist/hooks/call.js +1550 -0
- package/dist/hooks/call.js.map +1 -0
- package/dist/hooks/consumer.d.ts +7 -0
- package/dist/hooks/consumer.d.ts.map +1 -0
- package/dist/hooks/consumer.js +5 -0
- package/dist/hooks/consumer.js.map +1 -0
- package/dist/hooks/continuity.d.ts +155 -0
- package/dist/hooks/continuity.d.ts.map +1 -0
- package/dist/hooks/continuity.js +187 -0
- package/dist/hooks/continuity.js.map +1 -0
- package/dist/hooks/dispatch-script.d.ts +27 -0
- package/dist/hooks/dispatch-script.d.ts.map +1 -0
- package/dist/hooks/dispatch-script.js +77 -0
- package/dist/hooks/dispatch-script.js.map +1 -0
- package/dist/hooks/edit-targets.d.ts +23 -0
- package/dist/hooks/edit-targets.d.ts.map +1 -0
- package/dist/hooks/edit-targets.js +74 -0
- package/dist/hooks/edit-targets.js.map +1 -0
- package/dist/hooks/hook-delivery.d.ts +21 -0
- package/dist/hooks/hook-delivery.d.ts.map +1 -0
- package/dist/hooks/hook-delivery.js +87 -0
- package/dist/hooks/hook-delivery.js.map +1 -0
- package/dist/hooks/hook-seat.d.ts +37 -0
- package/dist/hooks/hook-seat.d.ts.map +1 -0
- package/dist/hooks/hook-seat.js +59 -0
- package/dist/hooks/hook-seat.js.map +1 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/native-edit-guard.d.ts +25 -0
- package/dist/hooks/native-edit-guard.d.ts.map +1 -0
- package/dist/hooks/native-edit-guard.js +33 -0
- package/dist/hooks/native-edit-guard.js.map +1 -0
- package/dist/hooks/native-edit-locks.d.ts +54 -0
- package/dist/hooks/native-edit-locks.d.ts.map +1 -0
- package/dist/hooks/native-edit-locks.js +98 -0
- package/dist/hooks/native-edit-locks.js.map +1 -0
- package/dist/hooks/resolve-event.d.ts +13 -0
- package/dist/hooks/resolve-event.d.ts.map +1 -0
- package/dist/hooks/resolve-event.js +32 -0
- package/dist/hooks/resolve-event.js.map +1 -0
- package/dist/hooks/review-state.d.ts +22 -0
- package/dist/hooks/review-state.d.ts.map +1 -0
- package/dist/hooks/review-state.js +57 -0
- package/dist/hooks/review-state.js.map +1 -0
- package/dist/hooks/runtime.d.ts +146 -0
- package/dist/hooks/runtime.d.ts.map +1 -0
- package/dist/hooks/runtime.js +83 -0
- package/dist/hooks/runtime.js.map +1 -0
- package/dist/hooks/self-review.d.ts +14 -0
- package/dist/hooks/self-review.d.ts.map +1 -0
- package/dist/hooks/self-review.js +28 -0
- package/dist/hooks/self-review.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/logging/subagent-completions.output.descriptor.d.ts +4 -0
- package/dist/ingest/logging/subagent-completions.output.descriptor.d.ts.map +1 -0
- package/dist/ingest/logging/subagent-completions.output.descriptor.js +22 -0
- package/dist/ingest/logging/subagent-completions.output.descriptor.js.map +1 -0
- package/dist/ingest/logging/success-patterns.output.descriptor.d.ts +4 -0
- package/dist/ingest/logging/success-patterns.output.descriptor.d.ts.map +1 -0
- package/dist/ingest/logging/success-patterns.output.descriptor.js +22 -0
- package/dist/ingest/logging/success-patterns.output.descriptor.js.map +1 -0
- package/dist/ingest/logging/tool-use.output.descriptor.d.ts +4 -0
- package/dist/ingest/logging/tool-use.output.descriptor.d.ts.map +1 -0
- package/dist/ingest/logging/tool-use.output.descriptor.js +22 -0
- package/dist/ingest/logging/tool-use.output.descriptor.js.map +1 -0
- package/dist/ingest/resolve-log-paths.d.ts +16 -0
- package/dist/ingest/resolve-log-paths.d.ts.map +1 -0
- package/dist/ingest/resolve-log-paths.js +43 -0
- package/dist/ingest/resolve-log-paths.js.map +1 -0
- package/dist/ingest/schemas.d.ts +43 -0
- package/dist/ingest/schemas.d.ts.map +1 -0
- package/dist/ingest/schemas.js +46 -0
- package/dist/ingest/schemas.js.map +1 -0
- package/dist/jsonrpc/client.d.ts +129 -0
- package/dist/jsonrpc/client.d.ts.map +1 -0
- package/dist/jsonrpc/client.js +553 -0
- package/dist/jsonrpc/client.js.map +1 -0
- package/dist/jsonrpc/envelope.d.ts +37 -0
- package/dist/jsonrpc/envelope.d.ts.map +1 -0
- package/dist/jsonrpc/envelope.js +46 -0
- package/dist/jsonrpc/envelope.js.map +1 -0
- package/dist/jsonrpc/errors.d.ts +28 -0
- package/dist/jsonrpc/errors.d.ts.map +1 -0
- package/dist/jsonrpc/errors.js +110 -0
- package/dist/jsonrpc/errors.js.map +1 -0
- package/dist/jsonrpc/framing.d.ts +35 -0
- package/dist/jsonrpc/framing.d.ts.map +1 -0
- package/dist/jsonrpc/framing.js +134 -0
- package/dist/jsonrpc/framing.js.map +1 -0
- package/dist/jsonrpc/index.d.ts +11 -0
- package/dist/jsonrpc/index.d.ts.map +1 -0
- package/dist/jsonrpc/index.js +11 -0
- package/dist/jsonrpc/index.js.map +1 -0
- package/dist/jsonrpc/outcome.d.ts +25 -0
- package/dist/jsonrpc/outcome.d.ts.map +1 -0
- package/dist/jsonrpc/outcome.js +32 -0
- package/dist/jsonrpc/outcome.js.map +1 -0
- package/dist/jsonrpc/queue.d.ts +30 -0
- package/dist/jsonrpc/queue.d.ts.map +1 -0
- package/dist/jsonrpc/queue.js +113 -0
- package/dist/jsonrpc/queue.js.map +1 -0
- package/dist/jsonrpc/schemas.d.ts +74 -0
- package/dist/jsonrpc/schemas.d.ts.map +1 -0
- package/dist/jsonrpc/schemas.js +65 -0
- package/dist/jsonrpc/schemas.js.map +1 -0
- package/dist/launch/consumer/execute.d.ts +5 -0
- package/dist/launch/consumer/execute.d.ts.map +1 -0
- package/dist/launch/consumer/execute.js +358 -0
- package/dist/launch/consumer/execute.js.map +1 -0
- package/dist/launch/consumer/paths.d.ts +15 -0
- package/dist/launch/consumer/paths.d.ts.map +1 -0
- package/dist/launch/consumer/paths.js +18 -0
- package/dist/launch/consumer/paths.js.map +1 -0
- package/dist/launch/consumer/prepare.d.ts +25 -0
- package/dist/launch/consumer/prepare.d.ts.map +1 -0
- package/dist/launch/consumer/prepare.js +158 -0
- package/dist/launch/consumer/prepare.js.map +1 -0
- package/dist/launch/consumer/prompt.d.ts +18 -0
- package/dist/launch/consumer/prompt.d.ts.map +1 -0
- package/dist/launch/consumer/prompt.js +45 -0
- package/dist/launch/consumer/prompt.js.map +1 -0
- package/dist/launch/consumer/rotate-logs.d.ts +23 -0
- package/dist/launch/consumer/rotate-logs.d.ts.map +1 -0
- package/dist/launch/consumer/rotate-logs.js +43 -0
- package/dist/launch/consumer/rotate-logs.js.map +1 -0
- package/dist/launch/consumer/spawn.d.ts +38 -0
- package/dist/launch/consumer/spawn.d.ts.map +1 -0
- package/dist/launch/consumer/spawn.js +82 -0
- package/dist/launch/consumer/spawn.js.map +1 -0
- package/dist/launch/consumer/state-rows.d.ts +41 -0
- package/dist/launch/consumer/state-rows.d.ts.map +1 -0
- package/dist/launch/consumer/state-rows.js +78 -0
- package/dist/launch/consumer/state-rows.js.map +1 -0
- package/dist/launch/consumer/store.d.ts +139 -0
- package/dist/launch/consumer/store.d.ts.map +1 -0
- package/dist/launch/consumer/store.js +495 -0
- package/dist/launch/consumer/store.js.map +1 -0
- package/dist/launch/index.d.ts +5 -0
- package/dist/launch/index.d.ts.map +1 -0
- package/dist/launch/index.js +3 -0
- package/dist/launch/index.js.map +1 -0
- package/dist/launch/resolve.d.ts +9 -0
- package/dist/launch/resolve.d.ts.map +1 -0
- package/dist/launch/resolve.js +139 -0
- package/dist/launch/resolve.js.map +1 -0
- package/dist/launch/schemas.d.ts +289 -0
- package/dist/launch/schemas.d.ts.map +1 -0
- package/dist/launch/schemas.js +154 -0
- package/dist/launch/schemas.js.map +1 -0
- package/dist/launch/task-executor/external-harness.descriptor.d.ts +6 -0
- package/dist/launch/task-executor/external-harness.descriptor.d.ts.map +1 -0
- package/dist/launch/task-executor/external-harness.descriptor.js +13 -0
- package/dist/launch/task-executor/external-harness.descriptor.js.map +1 -0
- package/dist/launch/task-executor/external-harness.impl.consumer.d.ts +17 -0
- package/dist/launch/task-executor/external-harness.impl.consumer.d.ts.map +1 -0
- package/dist/launch/task-executor/external-harness.impl.consumer.js +151 -0
- package/dist/launch/task-executor/external-harness.impl.consumer.js.map +1 -0
- package/dist/launch/task-executor/isolated-workspace.d.ts +3 -0
- package/dist/launch/task-executor/isolated-workspace.d.ts.map +1 -0
- package/dist/launch/task-executor/isolated-workspace.js +3 -0
- package/dist/launch/task-executor/isolated-workspace.js.map +1 -0
- package/dist/launch/task-executor/session-locks.d.ts +28 -0
- package/dist/launch/task-executor/session-locks.d.ts.map +1 -0
- package/dist/launch/task-executor/session-locks.js +50 -0
- package/dist/launch/task-executor/session-locks.js.map +1 -0
- package/dist/pack/adapter-codegen.d.ts +38 -0
- package/dist/pack/adapter-codegen.d.ts.map +1 -0
- package/dist/pack/adapter-codegen.js +70 -0
- package/dist/pack/adapter-codegen.js.map +1 -0
- package/dist/pack/build.d.ts +48 -0
- package/dist/pack/build.d.ts.map +1 -0
- package/dist/pack/build.js +171 -0
- package/dist/pack/build.js.map +1 -0
- package/dist/pack/emitters/hooks.d.ts +14 -0
- package/dist/pack/emitters/hooks.d.ts.map +1 -0
- package/dist/pack/emitters/hooks.js +15 -0
- package/dist/pack/emitters/hooks.js.map +1 -0
- package/dist/pack/emitters/json.d.ts +10 -0
- package/dist/pack/emitters/json.d.ts.map +1 -0
- package/dist/pack/emitters/json.js +17 -0
- package/dist/pack/emitters/json.js.map +1 -0
- package/dist/pack/emitters/registry.d.ts +22 -0
- package/dist/pack/emitters/registry.d.ts.map +1 -0
- package/dist/pack/emitters/registry.js +38 -0
- package/dist/pack/emitters/registry.js.map +1 -0
- package/dist/pack/emitters/toml.d.ts +8 -0
- package/dist/pack/emitters/toml.d.ts.map +1 -0
- package/dist/pack/emitters/toml.js +28 -0
- package/dist/pack/emitters/toml.js.map +1 -0
- package/dist/pack/emitters/yaml.d.ts +8 -0
- package/dist/pack/emitters/yaml.d.ts.map +1 -0
- package/dist/pack/emitters/yaml.js +27 -0
- package/dist/pack/emitters/yaml.js.map +1 -0
- package/dist/pack/index.d.ts +11 -0
- package/dist/pack/index.d.ts.map +1 -0
- package/dist/pack/index.js +11 -0
- package/dist/pack/index.js.map +1 -0
- package/dist/pack/mcp.d.ts +28 -0
- package/dist/pack/mcp.d.ts.map +1 -0
- package/dist/pack/mcp.js +70 -0
- package/dist/pack/mcp.js.map +1 -0
- package/dist/pack/persist.d.ts +28 -0
- package/dist/pack/persist.d.ts.map +1 -0
- package/dist/pack/persist.js +35 -0
- package/dist/pack/persist.js.map +1 -0
- package/dist/pack/schema.d.ts +126 -0
- package/dist/pack/schema.d.ts.map +1 -0
- package/dist/pack/schema.js +56 -0
- package/dist/pack/schema.js.map +1 -0
- package/dist/plugins/index.d.ts +512 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +25 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/installers/config-file.d.ts +21 -0
- package/dist/plugins/installers/config-file.d.ts.map +1 -0
- package/dist/plugins/installers/config-file.js +48 -0
- package/dist/plugins/installers/config-file.js.map +1 -0
- package/dist/plugins/installers/config-value.d.ts +35 -0
- package/dist/plugins/installers/config-value.d.ts.map +1 -0
- package/dist/plugins/installers/config-value.js +52 -0
- package/dist/plugins/installers/config-value.js.map +1 -0
- package/dist/plugins/installers/hooks/index.d.ts +9 -0
- package/dist/plugins/installers/hooks/index.d.ts.map +1 -0
- package/dist/plugins/installers/hooks/index.js +12 -0
- package/dist/plugins/installers/hooks/index.js.map +1 -0
- package/dist/plugins/installers/hooks/scoped-paths.d.ts +24 -0
- package/dist/plugins/installers/hooks/scoped-paths.d.ts.map +1 -0
- package/dist/plugins/installers/hooks/scoped-paths.js +80 -0
- package/dist/plugins/installers/hooks/scoped-paths.js.map +1 -0
- package/dist/plugins/installers/hooks/settings-registration.d.ts +79 -0
- package/dist/plugins/installers/hooks/settings-registration.d.ts.map +1 -0
- package/dist/plugins/installers/hooks/settings-registration.js +125 -0
- package/dist/plugins/installers/hooks/settings-registration.js.map +1 -0
- package/dist/plugins/installers/hooks/shell-installer.d.ts +21 -0
- package/dist/plugins/installers/hooks/shell-installer.d.ts.map +1 -0
- package/dist/plugins/installers/hooks/shell-installer.js +298 -0
- package/dist/plugins/installers/hooks/shell-installer.js.map +1 -0
- package/dist/plugins/installers/hooks/uninstall-backup.d.ts +19 -0
- package/dist/plugins/installers/hooks/uninstall-backup.d.ts.map +1 -0
- package/dist/plugins/installers/hooks/uninstall-backup.js +20 -0
- package/dist/plugins/installers/hooks/uninstall-backup.js.map +1 -0
- package/dist/plugins/installers/index.d.ts +58 -0
- package/dist/plugins/installers/index.d.ts.map +1 -0
- package/dist/plugins/installers/index.js +303 -0
- package/dist/plugins/installers/index.js.map +1 -0
- package/dist/plugins/installers/mcp/environment.d.ts +180 -0
- package/dist/plugins/installers/mcp/environment.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/environment.js +314 -0
- package/dist/plugins/installers/mcp/environment.js.map +1 -0
- package/dist/plugins/installers/mcp/index.d.ts +9 -0
- package/dist/plugins/installers/mcp/index.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/index.js +11 -0
- package/dist/plugins/installers/mcp/index.js.map +1 -0
- package/dist/plugins/installers/mcp/json-installer.d.ts +18 -0
- package/dist/plugins/installers/mcp/json-installer.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/json-installer.js +155 -0
- package/dist/plugins/installers/mcp/json-installer.js.map +1 -0
- package/dist/plugins/installers/mcp/json-paths.d.ts +13 -0
- package/dist/plugins/installers/mcp/json-paths.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/json-paths.js +130 -0
- package/dist/plugins/installers/mcp/json-paths.js.map +1 -0
- package/dist/plugins/installers/mcp/serve-identity.d.ts +19 -0
- package/dist/plugins/installers/mcp/serve-identity.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/serve-identity.js +31 -0
- package/dist/plugins/installers/mcp/serve-identity.js.map +1 -0
- package/dist/plugins/installers/mcp/server-config.d.ts +20 -0
- package/dist/plugins/installers/mcp/server-config.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/server-config.js +64 -0
- package/dist/plugins/installers/mcp/server-config.js.map +1 -0
- package/dist/plugins/installers/mcp/toml-installer.d.ts +41 -0
- package/dist/plugins/installers/mcp/toml-installer.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/toml-installer.js +407 -0
- package/dist/plugins/installers/mcp/toml-installer.js.map +1 -0
- package/dist/plugins/installers/mcp/yaml-installer.d.ts +22 -0
- package/dist/plugins/installers/mcp/yaml-installer.d.ts.map +1 -0
- package/dist/plugins/installers/mcp/yaml-installer.js +156 -0
- package/dist/plugins/installers/mcp/yaml-installer.js.map +1 -0
- package/dist/plugins/installers/runtime.d.ts +42 -0
- package/dist/plugins/installers/runtime.d.ts.map +1 -0
- package/dist/plugins/installers/runtime.js +56 -0
- package/dist/plugins/installers/runtime.js.map +1 -0
- package/dist/plugins/installers/types.d.ts +306 -0
- package/dist/plugins/installers/types.d.ts.map +1 -0
- package/dist/plugins/installers/types.js +40 -0
- package/dist/plugins/installers/types.js.map +1 -0
- package/dist/plugins/schemas/index.d.ts +6 -0
- package/dist/plugins/schemas/index.d.ts.map +1 -0
- package/dist/plugins/schemas/index.js +5 -0
- package/dist/plugins/schemas/index.js.map +1 -0
- package/dist/plugins/schemas/manifest.d.ts +527 -0
- package/dist/plugins/schemas/manifest.d.ts.map +1 -0
- package/dist/plugins/schemas/manifest.js +355 -0
- package/dist/plugins/schemas/manifest.js.map +1 -0
- package/dist/plugins/tools/index.d.ts +12 -0
- package/dist/plugins/tools/index.d.ts.map +1 -0
- package/dist/plugins/tools/index.js +19 -0
- package/dist/plugins/tools/index.js.map +1 -0
- package/dist/presets/executor.d.ts +20 -0
- package/dist/presets/executor.d.ts.map +1 -0
- package/dist/presets/executor.js +629 -0
- package/dist/presets/executor.js.map +1 -0
- package/dist/presets/file-backup.d.ts +66 -0
- package/dist/presets/file-backup.d.ts.map +1 -0
- package/dist/presets/file-backup.js +108 -0
- package/dist/presets/file-backup.js.map +1 -0
- package/dist/presets/index.d.ts +11 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/index.js +10 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/resolve.d.ts +32 -0
- package/dist/presets/resolve.d.ts.map +1 -0
- package/dist/presets/resolve.js +49 -0
- package/dist/presets/resolve.js.map +1 -0
- package/dist/presets/runtime.d.ts +21 -0
- package/dist/presets/runtime.d.ts.map +1 -0
- package/dist/presets/runtime.js +115 -0
- package/dist/presets/runtime.js.map +1 -0
- package/dist/projection/attestation.d.ts +43 -0
- package/dist/projection/attestation.d.ts.map +1 -0
- package/dist/projection/attestation.js +59 -0
- package/dist/projection/attestation.js.map +1 -0
- package/dist/runtime/agent-roster-provider.d.ts +75 -0
- package/dist/runtime/agent-roster-provider.d.ts.map +1 -0
- package/dist/runtime/agent-roster-provider.js +30 -0
- package/dist/runtime/agent-roster-provider.js.map +1 -0
- package/dist/runtime/external-surface-projector.d.ts +37 -0
- package/dist/runtime/external-surface-projector.d.ts.map +1 -0
- package/dist/runtime/external-surface-projector.js +21 -0
- package/dist/runtime/external-surface-projector.js.map +1 -0
- package/dist/runtime/lifecycle-task.d.ts +54 -0
- package/dist/runtime/lifecycle-task.d.ts.map +1 -0
- package/dist/runtime/lifecycle-task.js +106 -0
- package/dist/runtime/lifecycle-task.js.map +1 -0
- package/dist/runtime.d.ts +496 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +168 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schemas/agent-message.d.ts +136 -0
- package/dist/schemas/agent-message.d.ts.map +1 -0
- package/dist/schemas/agent-message.js +131 -0
- package/dist/schemas/agent-message.js.map +1 -0
- package/dist/schemas/agent-roster.d.ts +50 -0
- package/dist/schemas/agent-roster.d.ts.map +1 -0
- package/dist/schemas/agent-roster.js +52 -0
- package/dist/schemas/agent-roster.js.map +1 -0
- package/dist/schemas/collision.d.ts +109 -0
- package/dist/schemas/collision.d.ts.map +1 -0
- package/dist/schemas/collision.js +71 -0
- package/dist/schemas/collision.js.map +1 -0
- package/dist/schemas/context-summary.d.ts +225 -0
- package/dist/schemas/context-summary.d.ts.map +1 -0
- package/dist/schemas/context-summary.js +117 -0
- package/dist/schemas/context-summary.js.map +1 -0
- package/dist/schemas/file-access.d.ts +176 -0
- package/dist/schemas/file-access.d.ts.map +1 -0
- package/dist/schemas/file-access.js +139 -0
- package/dist/schemas/file-access.js.map +1 -0
- package/dist/schemas/hooks.d.ts +170 -0
- package/dist/schemas/hooks.d.ts.map +1 -0
- package/dist/schemas/hooks.js +171 -0
- package/dist/schemas/hooks.js.map +1 -0
- package/dist/schemas/index.d.ts +19 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +17 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/path-identity.d.ts +44 -0
- package/dist/schemas/path-identity.d.ts.map +1 -0
- package/dist/schemas/path-identity.js +93 -0
- package/dist/schemas/path-identity.js.map +1 -0
- package/dist/schemas/pending-notice.d.ts +13 -0
- package/dist/schemas/pending-notice.d.ts.map +1 -0
- package/dist/schemas/pending-notice.js +5 -0
- package/dist/schemas/pending-notice.js.map +1 -0
- package/dist/schemas/presets.d.ts +1239 -0
- package/dist/schemas/presets.d.ts.map +1 -0
- package/dist/schemas/presets.js +270 -0
- package/dist/schemas/presets.js.map +1 -0
- package/dist/schemas/roster.d.ts +96 -0
- package/dist/schemas/roster.d.ts.map +1 -0
- package/dist/schemas/roster.js +310 -0
- package/dist/schemas/roster.js.map +1 -0
- package/dist/schemas/tiers.d.ts +95 -0
- package/dist/schemas/tiers.d.ts.map +1 -0
- package/dist/schemas/tiers.js +143 -0
- package/dist/schemas/tiers.js.map +1 -0
- package/dist/schemas/touch-identity.d.ts +25 -0
- package/dist/schemas/touch-identity.d.ts.map +1 -0
- package/dist/schemas/touch-identity.js +16 -0
- package/dist/schemas/touch-identity.js.map +1 -0
- package/dist/schemas/touch-projection.d.ts +157 -0
- package/dist/schemas/touch-projection.d.ts.map +1 -0
- package/dist/schemas/touch-projection.js +100 -0
- package/dist/schemas/touch-projection.js.map +1 -0
- package/dist/session-capability.d.ts +88 -0
- package/dist/session-capability.d.ts.map +1 -0
- package/dist/session-capability.js +28 -0
- package/dist/session-capability.js.map +1 -0
- package/dist/setup/index.d.ts +9 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/dist/setup/index.js +8 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/steps/detect-tools.d.ts +9 -0
- package/dist/setup/steps/detect-tools.d.ts.map +1 -0
- package/dist/setup/steps/detect-tools.js +120 -0
- package/dist/setup/steps/detect-tools.js.map +1 -0
- package/dist/setup/steps/index.d.ts +11 -0
- package/dist/setup/steps/index.d.ts.map +1 -0
- package/dist/setup/steps/index.js +11 -0
- package/dist/setup/steps/index.js.map +1 -0
- package/dist/setup/steps/install-helpers.d.ts +9 -0
- package/dist/setup/steps/install-helpers.d.ts.map +1 -0
- package/dist/setup/steps/install-helpers.js +29 -0
- package/dist/setup/steps/install-helpers.js.map +1 -0
- package/dist/setup/steps/install.d.ts +11 -0
- package/dist/setup/steps/install.d.ts.map +1 -0
- package/dist/setup/steps/install.js +143 -0
- package/dist/setup/steps/install.js.map +1 -0
- package/dist/setup/steps/select-location.d.ts +8 -0
- package/dist/setup/steps/select-location.d.ts.map +1 -0
- package/dist/setup/steps/select-location.js +55 -0
- package/dist/setup/steps/select-location.js.map +1 -0
- package/dist/setup/steps/select-targets.d.ts +8 -0
- package/dist/setup/steps/select-targets.d.ts.map +1 -0
- package/dist/setup/steps/select-targets.js +53 -0
- package/dist/setup/steps/select-targets.js.map +1 -0
- package/dist/setup/steps/select-tiers.d.ts +8 -0
- package/dist/setup/steps/select-tiers.d.ts.map +1 -0
- package/dist/setup/steps/select-tiers.js +124 -0
- package/dist/setup/steps/select-tiers.js.map +1 -0
- package/dist/setup/types.d.ts +128 -0
- package/dist/setup/types.d.ts.map +1 -0
- package/dist/setup/types.js +28 -0
- package/dist/setup/types.js.map +1 -0
- package/dist/setup/wizard.d.ts +25 -0
- package/dist/setup/wizard.d.ts.map +1 -0
- package/dist/setup/wizard.js +182 -0
- package/dist/setup/wizard.js.map +1 -0
- package/dist/storage/agent-message.record.descriptor.d.ts +43 -0
- package/dist/storage/agent-message.record.descriptor.d.ts.map +1 -0
- package/dist/storage/agent-message.record.descriptor.js +72 -0
- package/dist/storage/agent-message.record.descriptor.js.map +1 -0
- package/dist/storage/file-access.record.descriptor.d.ts +104 -0
- package/dist/storage/file-access.record.descriptor.d.ts.map +1 -0
- package/dist/storage/file-access.record.descriptor.js +370 -0
- package/dist/storage/file-access.record.descriptor.js.map +1 -0
- package/dist/storage/touch-identity.d.ts +43 -0
- package/dist/storage/touch-identity.d.ts.map +1 -0
- package/dist/storage/touch-identity.js +155 -0
- package/dist/storage/touch-identity.js.map +1 -0
- package/dist/svelte/external-svelte.plugin.d.ts +39 -0
- package/dist/svelte/external-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/external-svelte.plugin.js +25 -0
- package/dist/svelte/index.d.ts +11 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +10 -0
- package/dist/svelte/styles.css +8 -0
- package/dist/svelte/tool-widgets/ExternalToolCard.svelte +71 -0
- package/dist/svelte/tool-widgets/ExternalToolCard.svelte.d.ts +5 -0
- package/dist/svelte/tool-widgets/ExternalToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.d.ts +3 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +2 -0
- package/dist/svelte/tool-widgets/summary.d.ts +27 -0
- package/dist/svelte/tool-widgets/summary.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/summary.js +198 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/unified/action-descriptors.d.ts +185 -0
- package/dist/tools/unified/action-descriptors.d.ts.map +1 -0
- package/dist/tools/unified/action-descriptors.js +10 -0
- package/dist/tools/unified/action-descriptors.js.map +1 -0
- package/dist/tools/unified/action-input.d.ts +7 -0
- package/dist/tools/unified/action-input.d.ts.map +1 -0
- package/dist/tools/unified/action-input.js +13 -0
- package/dist/tools/unified/action-input.js.map +1 -0
- package/dist/tools/unified/actions.d.ts +10 -0
- package/dist/tools/unified/actions.d.ts.map +1 -0
- package/dist/tools/unified/actions.js +26 -0
- package/dist/tools/unified/actions.js.map +1 -0
- package/dist/tools/unified/external.descriptor.d.ts +30 -0
- package/dist/tools/unified/external.descriptor.d.ts.map +1 -0
- package/dist/tools/unified/external.descriptor.js +27 -0
- package/dist/tools/unified/external.descriptor.js.map +1 -0
- package/dist/tools/unified/external.impl.consumer.d.ts +8 -0
- package/dist/tools/unified/external.impl.consumer.d.ts.map +1 -0
- package/dist/tools/unified/external.impl.consumer.js +38 -0
- package/dist/tools/unified/external.impl.consumer.js.map +1 -0
- package/dist/tools/unified/handlers/context-summary.d.ts +4 -0
- package/dist/tools/unified/handlers/context-summary.d.ts.map +1 -0
- package/dist/tools/unified/handlers/context-summary.js +271 -0
- package/dist/tools/unified/handlers/context-summary.js.map +1 -0
- package/dist/tools/unified/handlers/file-access-list.d.ts +4 -0
- package/dist/tools/unified/handlers/file-access-list.d.ts.map +1 -0
- package/dist/tools/unified/handlers/file-access-list.js +39 -0
- package/dist/tools/unified/handlers/file-access-list.js.map +1 -0
- package/dist/tools/unified/handlers/file-access-track.d.ts +4 -0
- package/dist/tools/unified/handlers/file-access-track.d.ts.map +1 -0
- package/dist/tools/unified/handlers/file-access-track.js +34 -0
- package/dist/tools/unified/handlers/file-access-track.js.map +1 -0
- package/dist/tools/unified/handlers/hook-call.d.ts +23 -0
- package/dist/tools/unified/handlers/hook-call.d.ts.map +1 -0
- package/dist/tools/unified/handlers/hook-call.js +86 -0
- package/dist/tools/unified/handlers/hook-call.js.map +1 -0
- package/dist/tools/unified/handlers/hook-generator.d.ts +4 -0
- package/dist/tools/unified/handlers/hook-generator.d.ts.map +1 -0
- package/dist/tools/unified/handlers/hook-generator.js +37 -0
- package/dist/tools/unified/handlers/hook-generator.js.map +1 -0
- package/dist/tools/unified/handlers/signal.d.ts +22 -0
- package/dist/tools/unified/handlers/signal.d.ts.map +1 -0
- package/dist/tools/unified/handlers/signal.js +114 -0
- package/dist/tools/unified/handlers/signal.js.map +1 -0
- package/dist/tools/unified/index.d.ts +6 -0
- package/dist/tools/unified/index.d.ts.map +1 -0
- package/dist/tools/unified/index.js +6 -0
- package/dist/tools/unified/index.js.map +1 -0
- package/dist/tools/unified/install/handler.d.ts +4 -0
- package/dist/tools/unified/install/handler.d.ts.map +1 -0
- package/dist/tools/unified/install/handler.js +17 -0
- package/dist/tools/unified/install/handler.js.map +1 -0
- package/dist/tools/unified/runtime.d.ts +35 -0
- package/dist/tools/unified/runtime.d.ts.map +1 -0
- package/dist/tools/unified/runtime.js +23 -0
- package/dist/tools/unified/runtime.js.map +1 -0
- package/dist/tools/unified/schemas.d.ts +160 -0
- package/dist/tools/unified/schemas.d.ts.map +1 -0
- package/dist/tools/unified/schemas.js +139 -0
- package/dist/tools/unified/schemas.js.map +1 -0
- package/dist/utils/fs-absence.d.ts +22 -0
- package/dist/utils/fs-absence.d.ts.map +1 -0
- package/dist/utils/fs-absence.js +37 -0
- package/dist/utils/fs-absence.js.map +1 -0
- package/dist/utils/runtime-fs.d.ts +37 -0
- package/dist/utils/runtime-fs.d.ts.map +1 -0
- package/dist/utils/runtime-fs.js +100 -0
- package/dist/utils/runtime-fs.js.map +1 -0
- package/dist/utils/toml.d.ts +26 -0
- package/dist/utils/toml.d.ts.map +1 -0
- package/dist/utils/toml.js +415 -0
- package/dist/utils/toml.js.map +1 -0
- package/package.json +263 -4
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { CapabilityError, CaughtFailureSchema, isCapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { serviceOrigin } from '@vibesdotdev/infra-core/service';
|
|
3
|
+
import { mcpHostClaimPath, parsePortValue, resolveMcpHostPort } from '@vibesdotdev/paths/workspace-mcp-host';
|
|
4
|
+
import { join } from '@vibesdotdev/filesystem';
|
|
5
|
+
import { getRuntimeProcessService } from '@vibesdotdev/kernel/process';
|
|
6
|
+
import * as z from 'zod/v4';
|
|
7
|
+
import { deleteOwn, ownObject, ownValue, setOwn } from "../config-value.js";
|
|
8
|
+
import { parseHostConfig } from "../../../detection/config-document.js";
|
|
9
|
+
import { externalFileSystem, readTextIfPresent } from "../../../utils/runtime-fs.js";
|
|
10
|
+
/**
|
|
11
|
+
* The tier a host declared. A host that declares none cannot say whether its
|
|
12
|
+
* installs should dial a local or a hosted MCP, so it fails closed.
|
|
13
|
+
*/
|
|
14
|
+
export function mcpEnvironmentTier(scope) {
|
|
15
|
+
const name = scope.qualifiers?.environmentTier?.trim();
|
|
16
|
+
if (!name) {
|
|
17
|
+
throw new CapabilityError('This host declares no environment tier, so the MCP origin to write is unknown.', 'UNAVAILABLE', {
|
|
18
|
+
reason: 'tier-undeclared',
|
|
19
|
+
retryable: false,
|
|
20
|
+
recoveryHint: 'The host declaration must set qualifiers.environmentTier.'
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return { name, isLocal: name === 'local' || name === 'dev' };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The hosted MCP origin a non-local install writes: the declared `mcp`
|
|
27
|
+
* `infra/service` (rc04 §2.4) in the runtime's configured service
|
|
28
|
+
* environment. `undefined` for a local tier (it dials the workspace's MCP
|
|
29
|
+
* host), and when the host declares no `mcp` service for that environment
|
|
30
|
+
* (`service-undeclared`, a confirmed absence: stdio installs never dial it,
|
|
31
|
+
* and an http install then fails `hosted-mcp-undeclared`). Any other failure
|
|
32
|
+
* throws.
|
|
33
|
+
*/
|
|
34
|
+
export async function resolveHostedMcpOrigin(runtime) {
|
|
35
|
+
if (mcpEnvironmentTier(runtime.declaredScope).isLocal)
|
|
36
|
+
return undefined;
|
|
37
|
+
// Ask the declared fact: a host that declares no `mcp` service has no hosted origin.
|
|
38
|
+
if (!runtime.hasKind('infra/service') || runtime.query('infra/service').withId('mcp').descriptors().length === 0) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
return (await serviceOrigin(runtime, 'mcp')).replace(/\/$/, '');
|
|
42
|
+
}
|
|
43
|
+
import { buildMcpServeArgs, resolveMcpServeIdentity } from "./serve-identity.js";
|
|
44
|
+
export { buildMcpServeArgs, resolveMcpServeIdentity } from "./serve-identity.js";
|
|
45
|
+
export function getMcpEnvironmentConfig(env, catalogId, hostId = '') {
|
|
46
|
+
const localHttpUrl = () => {
|
|
47
|
+
if (env.localMcpUrl !== undefined)
|
|
48
|
+
return env.localMcpUrl;
|
|
49
|
+
return env.workspaceRoot
|
|
50
|
+
? localMcpUrl(resolveMcpHostPort({ workspaceRoot: env.workspaceRoot }))
|
|
51
|
+
: undefined;
|
|
52
|
+
};
|
|
53
|
+
if (env.detectedBinary) {
|
|
54
|
+
const { command, args: baseArgs } = env.detectedBinary;
|
|
55
|
+
return {
|
|
56
|
+
command,
|
|
57
|
+
args: buildMcpServeArgs(baseArgs, catalogId, hostId),
|
|
58
|
+
httpUrl: env.isLocal ? localHttpUrl() : env.hostedMcpOrigin
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const args = buildMcpServeArgs(['dev', 'mcp', 'serve'], catalogId, hostId);
|
|
62
|
+
if (env.isLocal) {
|
|
63
|
+
return { command: resolveLocalCliCommand(env.userHome, env.platform), args, httpUrl: localHttpUrl() };
|
|
64
|
+
}
|
|
65
|
+
return { command: 'vibes', args, httpUrl: env.hostedMcpOrigin };
|
|
66
|
+
}
|
|
67
|
+
/** A host claim's fields, each read independently; a field that is not its shape is absent. */
|
|
68
|
+
const ClaimPidSchema = z.number().int().positive();
|
|
69
|
+
const ClaimPortSchema = z.union([z.number(), z.string()]);
|
|
70
|
+
const ClaimWorkspaceSchema = z.string();
|
|
71
|
+
/** The claim's three fields, each its own parse (one bad field never hides another). */
|
|
72
|
+
function claimFields(raw) {
|
|
73
|
+
const pid = ClaimPidSchema.safeParse(ownValue(raw, 'pid'));
|
|
74
|
+
const port = ClaimPortSchema.safeParse(ownValue(raw, 'port'));
|
|
75
|
+
const workspaceRoot = ClaimWorkspaceSchema.safeParse(ownValue(raw, 'workspaceRoot'));
|
|
76
|
+
const fields = {};
|
|
77
|
+
if (pid.success)
|
|
78
|
+
fields.pid = pid.data;
|
|
79
|
+
if (port.success)
|
|
80
|
+
fields.port = port.data;
|
|
81
|
+
if (workspaceRoot.success)
|
|
82
|
+
fields.workspaceRoot = workspaceRoot.data;
|
|
83
|
+
return fields;
|
|
84
|
+
}
|
|
85
|
+
/** The claim file's text, refused typed when it cannot be read; `null` when absent. */
|
|
86
|
+
async function readClaimText(fs, claimPath) {
|
|
87
|
+
try {
|
|
88
|
+
return await readTextIfPresent(fs, claimPath);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
throw new CapabilityError(`The MCP host claim ${claimPath} cannot be read.`, 'UNAVAILABLE', {
|
|
92
|
+
reason: 'fs-denied',
|
|
93
|
+
retryable: false,
|
|
94
|
+
details: { path: claimPath },
|
|
95
|
+
cause: CaughtFailureSchema.parse(error)
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Parse a claim document through the one host-config reader, or refuse it `INTERNAL` `data-corrupt` (path only). */
|
|
100
|
+
function parseClaim(raw, claimPath) {
|
|
101
|
+
try {
|
|
102
|
+
return parseHostConfig(raw, claimPath, 'json');
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
const failure = CaughtFailureSchema.parse(error);
|
|
106
|
+
if (!(failure instanceof Error && isCapabilityError(failure) && failure.reason === 'host-config-invalid'))
|
|
107
|
+
throw error;
|
|
108
|
+
throw new CapabilityError(`The MCP host claim ${claimPath} is not valid JSON.`, 'INTERNAL', {
|
|
109
|
+
reason: 'data-corrupt',
|
|
110
|
+
details: { path: claimPath },
|
|
111
|
+
cause: failure
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The port a LIVE local host is actually serving on, read from its own claim
|
|
117
|
+
* through the handed runtime's filesystem, with the claimed pid's liveness
|
|
118
|
+
* from its process service.
|
|
119
|
+
*
|
|
120
|
+
* The claim is the host's own record of what it bound (`pid`, `port`,
|
|
121
|
+
* `workspaceRoot`), so it beats any recomputation: it reflects an explicit
|
|
122
|
+
* `--port` the operator passed, which no derivation can know about. No claim,
|
|
123
|
+
* a claim for a dead pid, or one for another workspace is "no host". A claim
|
|
124
|
+
* that cannot be read or parsed fails typed: it is never silently a wrong
|
|
125
|
+
* endpoint. `roots.vibesHome` is the runtime's `paths/roots` Vibes home (D40),
|
|
126
|
+
* the root the claim's writer keys claims under; empty roots are refused
|
|
127
|
+
* `mcp-host-claim-roots-missing`.
|
|
128
|
+
*/
|
|
129
|
+
export async function readLiveHostPort(runtime, workspaceRoot, roots) {
|
|
130
|
+
const claimPath = mcpHostClaimPath(workspaceRoot, roots);
|
|
131
|
+
const raw = await readClaimText(await externalFileSystem(runtime), claimPath);
|
|
132
|
+
if (raw === null)
|
|
133
|
+
return null;
|
|
134
|
+
const claim = claimFields(parseClaim(raw, claimPath));
|
|
135
|
+
if (claim.pid === undefined || claim.port === undefined)
|
|
136
|
+
return null;
|
|
137
|
+
if (claim.workspaceRoot !== workspaceRoot)
|
|
138
|
+
return null;
|
|
139
|
+
const processes = await getRuntimeProcessService(runtime);
|
|
140
|
+
if (!(await processes.isRunning(claim.pid)))
|
|
141
|
+
return null;
|
|
142
|
+
return parsePortValue(claim.port);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The local MCP HTTP URL written into a tool's config AND dialled per hook call.
|
|
146
|
+
* Resolution order: the LIVE host's own claim for this workspace root (it
|
|
147
|
+
* records the port actually bound, including an explicit `--port`), else the
|
|
148
|
+
* workspace derivation through the SAME `resolveMcpHostPort` the host uses,
|
|
149
|
+
* so a config written while no host runs names the port the next host binds.
|
|
150
|
+
* No branch can produce a machine-global constant, and no env var redirects it.
|
|
151
|
+
*/
|
|
152
|
+
export async function resolveLocalMcpUrlForRuntime(runtime, roots) {
|
|
153
|
+
const live = await readLiveHostPort(runtime, roots.workspaceRoot, { vibesHome: roots.vibesHome });
|
|
154
|
+
return localMcpUrl(live ?? resolveMcpHostPort({ workspaceRoot: roots.workspaceRoot }));
|
|
155
|
+
}
|
|
156
|
+
function localMcpUrl(port) {
|
|
157
|
+
return `http://localhost:${port}/mcp`;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The installed CLI under the runtime's `paths/roots` user home, for the
|
|
161
|
+
* host's platform (`roots.platform`); a caller that names none gets the
|
|
162
|
+
* POSIX location.
|
|
163
|
+
*/
|
|
164
|
+
function resolveLocalCliCommand(userHome, platform) {
|
|
165
|
+
if (platform === 'win32')
|
|
166
|
+
return join(userHome, 'AppData', 'Local', 'vibes', 'bin', 'vibes.exe');
|
|
167
|
+
return join(userHome, '.local', 'bin', 'vibes');
|
|
168
|
+
}
|
|
169
|
+
/** The MCP server command and origin for an install on a host of `tier`. */
|
|
170
|
+
export function getEnvironmentConfig(tier, roots) {
|
|
171
|
+
const env = { ...tier, userHome: roots.userHome, vibesHome: roots.vibesHome, platform: roots.platform };
|
|
172
|
+
if (roots.localMcpUrl !== undefined)
|
|
173
|
+
env.localMcpUrl = roots.localMcpUrl;
|
|
174
|
+
return getMcpEnvironmentConfig(env);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The local MCP URL an install on `tier` writes for `workspaceRoot`: resolved
|
|
178
|
+
* through the runtime for a local tier with a workspace, else none.
|
|
179
|
+
*/
|
|
180
|
+
export async function installLocalMcpUrl(runtime, tier, roots) {
|
|
181
|
+
if (!tier.isLocal || !roots.workspaceRoot)
|
|
182
|
+
return undefined;
|
|
183
|
+
return resolveLocalMcpUrlForRuntime(runtime, { workspaceRoot: roots.workspaceRoot, vibesHome: roots.vibesHome });
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Identity + home anchors written into every MCP client config.
|
|
187
|
+
*
|
|
188
|
+
* Without these, GUI / non-shell launches (Claude Desktop, Grok Build, Codex)
|
|
189
|
+
* could fork storage/secrets into a different home and write presence under a
|
|
190
|
+
* default agent id — the mis-anchored body injury (see
|
|
191
|
+
* docs/findings/mcp-workspace-home-anchoring/FINDINGS.md).
|
|
192
|
+
*
|
|
193
|
+
* - `VIBES_AGENT_ID` — provider-declared presence/brain body slug
|
|
194
|
+
* - `VIBES_HARNESS` — provider-declared external host identity
|
|
195
|
+
* - `VIBES_MCP_PRESET` — catalog (`minimal` | `presence` | `code` | `full`)
|
|
196
|
+
* - `VIBES_HOME` — the runtime-selected home from paths/roots (`~/.vibes` by default),
|
|
197
|
+
* pinned so GUI launches share one home with CLI launches
|
|
198
|
+
*
|
|
199
|
+
* The project root is not an env var: an install that knows it pins it in the
|
|
200
|
+
* server's argv ({@link mcpWorkspaceRootArgs}), because the kernel ignores
|
|
201
|
+
* `VIBES_WORKSPACE_PATH`.
|
|
202
|
+
*/
|
|
203
|
+
export function buildMcpIdentityEnv(options) {
|
|
204
|
+
const clientId = options.clientId.trim();
|
|
205
|
+
// paths/roots already honors VIBES_HOME at composition; the caller that holds
|
|
206
|
+
// the runtime hands its vibesHome in, so there is one selection seam (#1098).
|
|
207
|
+
const home = options.vibesHome;
|
|
208
|
+
const identity = resolveMcpServeIdentity(options.catalogId ?? 'full', clientId, {
|
|
209
|
+
harness: options.harnessId,
|
|
210
|
+
agent: options.agentId
|
|
211
|
+
});
|
|
212
|
+
const env = { VIBES_MCP_PRESET: identity.preset, VIBES_HOME: home };
|
|
213
|
+
if (identity.agent)
|
|
214
|
+
env.VIBES_AGENT_ID = identity.agent;
|
|
215
|
+
if (identity.harness)
|
|
216
|
+
env.VIBES_HARNESS = identity.harness;
|
|
217
|
+
return env;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The argv that pins a `vibes` MCP server to an install's known project root:
|
|
221
|
+
* `--workspace-root <dir>`, the global flag the CLI pre-parses before its host
|
|
222
|
+
* binds. Empty when the install names no root, or names `/`, so the server
|
|
223
|
+
* binds from its own cwd.
|
|
224
|
+
*/
|
|
225
|
+
export function mcpWorkspaceRootArgs(workspacePath) {
|
|
226
|
+
const workspace = workspacePath?.trim();
|
|
227
|
+
return workspace && workspace !== '/' ? ['--workspace-root', workspace] : [];
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* `args` with the project pin inserted where the CLI's own self-spawn puts a
|
|
231
|
+
* global flag: after the executable prefix, before the `dev mcp serve`
|
|
232
|
+
* subcommand (a host manifest may require the argv to END with the serve
|
|
233
|
+
* identity). Unchanged when there is no pin or it already carries one (an
|
|
234
|
+
* agent-pack server built for the same install). Installers apply it to every
|
|
235
|
+
* stdio server they write, so a project config is pinned whichever path built it.
|
|
236
|
+
*/
|
|
237
|
+
export function pinWorkspaceRoot(args, workspacePath) {
|
|
238
|
+
const pin = mcpWorkspaceRootArgs(workspacePath);
|
|
239
|
+
if (pin.length === 0 || args.includes('--workspace-root'))
|
|
240
|
+
return [...args];
|
|
241
|
+
const serve = args.findIndex((arg, index) => arg === 'dev' && args[index + 1] === 'mcp' && args[index + 2] === 'serve');
|
|
242
|
+
const at = serve < 0 ? args.length : serve;
|
|
243
|
+
return [...args.slice(0, at), ...pin, ...args.slice(at)];
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The bearer key installers once published into a harness's MCP config. It is
|
|
247
|
+
* never written now: the spawned `vibes` MCP server resolves the caller's
|
|
248
|
+
* bearer from its own host's declared capability (the harness profile's
|
|
249
|
+
* device session, or a live `VIBES_HOST_CREDENTIALS` manifest from
|
|
250
|
+
* `vibes secrets exec`), rc01 §6 Q1 "Publishers" / R3.
|
|
251
|
+
*/
|
|
252
|
+
export const PUBLISHED_BEARER_KEY = 'VIBES_AUTH_TOKEN';
|
|
253
|
+
/** What an installer prints when a reinstall removes a previously published bearer. */
|
|
254
|
+
export const PUBLISHED_BEARER_REMOVED_NOTICE = `Removed ${PUBLISHED_BEARER_KEY} from the MCP config: the Vibes MCP server no longer runs as the ` +
|
|
255
|
+
'account whose token was written there. It now acts as whoever is signed in on this machine ' +
|
|
256
|
+
'(`vibes auth login`), or as the credentials `vibes secrets exec --session` publishes to it.';
|
|
257
|
+
/** True when an MCP server entry carries a published bearer in `env` or `settings`. */
|
|
258
|
+
export function hasPublishedBearer(serverConfig) {
|
|
259
|
+
if (!serverConfig)
|
|
260
|
+
return false;
|
|
261
|
+
return ['env', 'settings'].some((key) => {
|
|
262
|
+
const section = ownObject(serverConfig, key);
|
|
263
|
+
return section !== undefined && Object.hasOwn(section, PUBLISHED_BEARER_KEY);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/** Delete a published bearer from an MCP server entry's `env` and `settings`, in place. */
|
|
267
|
+
export function stripPublishedBearer(serverConfig) {
|
|
268
|
+
for (const key of ['env', 'settings']) {
|
|
269
|
+
const section = ownObject(serverConfig, key);
|
|
270
|
+
if (section)
|
|
271
|
+
deleteOwn(section, PUBLISHED_BEARER_KEY);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/** The install message, with the identity change appended when a published bearer was removed. */
|
|
275
|
+
export function withIdentityChange(message, removedPublishedBearer) {
|
|
276
|
+
return removedPublishedBearer ? `${message}\n${PUBLISHED_BEARER_REMOVED_NOTICE}` : message;
|
|
277
|
+
}
|
|
278
|
+
export function buildStdioConfig(envConfig,
|
|
279
|
+
/** Extra env merged after identity defaults. Never carries a bearer. */
|
|
280
|
+
extraEnv) {
|
|
281
|
+
const config = {
|
|
282
|
+
command: envConfig.command,
|
|
283
|
+
args: [...envConfig.args]
|
|
284
|
+
};
|
|
285
|
+
const env = {};
|
|
286
|
+
for (const [key, value] of Object.entries(extraEnv ?? {})) {
|
|
287
|
+
if (key !== PUBLISHED_BEARER_KEY)
|
|
288
|
+
setOwn(env, key, value);
|
|
289
|
+
}
|
|
290
|
+
if (Object.keys(env).length > 0) {
|
|
291
|
+
config.env = env;
|
|
292
|
+
}
|
|
293
|
+
return config;
|
|
294
|
+
}
|
|
295
|
+
export function buildHttpConfig(envConfig, authToken, urlKey = 'url') {
|
|
296
|
+
if (!envConfig.httpUrl) {
|
|
297
|
+
throw new CapabilityError('A local http MCP config dials the MCP host of a workspace, and none was given.', 'INVALID_INPUT', {
|
|
298
|
+
reason: 'workspace-root-required',
|
|
299
|
+
recoveryHint: 'Pass the workspace root, or install from inside a workspace.'
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
const config = { type: 'http' };
|
|
303
|
+
setOwn(config, urlKey, envConfig.httpUrl);
|
|
304
|
+
if (authToken) {
|
|
305
|
+
config.headers = { Authorization: `Bearer ${authToken}` };
|
|
306
|
+
}
|
|
307
|
+
return config;
|
|
308
|
+
}
|
|
309
|
+
export function buildMcpConfig(envConfig, mode, authToken) {
|
|
310
|
+
// A remote http server authenticates each request by its header; a stdio
|
|
311
|
+
// server resolves its own caller bearer, so it never receives one.
|
|
312
|
+
return mode === 'http' ? buildHttpConfig(envConfig, authToken) : buildStdioConfig(envConfig);
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/plugins/installers/mcp/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAsC,MAAM,qBAAqB,CAAC;AAClI,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACN,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAqB,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAA2B,MAAM,8BAA8B,CAAC;AAyB9G;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAElC;IACA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;IACvD,IAAI,CAAC,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Ae,CACxB,gFAAgF,EAChF,eAAe,EACf;YACC,MAAM,EAAE,yBAAyB;YACjC,YAAY,EAAE,8DAA8D;SAC5E,CACD,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC9C,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,CAAC,OAAO,GAAG,EAAE,aAAa,EAAE,UAAU,SAAS,EAAE,EAAE,CAAC;IAC3D,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAC7B,SAA+B,EAC/B,IAAkB,EAClB,SAAkB;IAElB,yEAAyE;IACzE,mEAAmE;IACnE,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { ConfigFormat } from '../../schemas/manifest.ts';
|
|
3
|
+
import type { McpInstaller } from '../types.ts';
|
|
4
|
+
export { JsonMcpInstaller } from './json-installer.ts';
|
|
5
|
+
export { TomlMcpInstaller, getTomlMcpServerConfigIssues } from './toml-installer.ts';
|
|
6
|
+
export { YamlMcpInstaller } from './yaml-installer.ts';
|
|
7
|
+
export declare function getMcpInstaller(format: ConfigFormat, runtime: VibesRuntime): Promise<McpInstaller | undefined>;
|
|
8
|
+
export declare function getAllMcpInstallers(runtime: VibesRuntime): Promise<McpInstaller[]>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/installers/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,eAAe,CAC9B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAEnC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAElF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { listExternalConfigInstallers, resolveExternalConfigInstaller } from "../runtime.js";
|
|
2
|
+
export { JsonMcpInstaller } from "./json-installer.js";
|
|
3
|
+
export { TomlMcpInstaller, getTomlMcpServerConfigIssues } from "./toml-installer.js";
|
|
4
|
+
export { YamlMcpInstaller } from "./yaml-installer.js";
|
|
5
|
+
export function getMcpInstaller(format, runtime) {
|
|
6
|
+
return resolveExternalConfigInstaller('mcp', format, runtime);
|
|
7
|
+
}
|
|
8
|
+
export function getAllMcpInstallers(runtime) {
|
|
9
|
+
return listExternalConfigInstallers('mcp', runtime);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/installers/mcp/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,4BAA4B,EAC5B,8BAA8B,EAC9B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,UAAU,eAAe,CAC9B,MAAoB,EACpB,OAAqB;IAErB,OAAO,8BAA8B,CAAe,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAqB;IACxD,OAAO,4BAA4B,CAAe,KAAK,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExternalHostManifest, ConfigFormat } from '../../schemas/manifest.ts';
|
|
2
|
+
import type { ExternalInstallRoots, ExternalInstallTarget, McpInstaller, McpInstallOptions, McpInstallResult, InstallResult } from '../types.ts';
|
|
3
|
+
import { type McpEnvironmentTier } from './environment.ts';
|
|
4
|
+
export declare class JsonMcpInstaller implements McpInstaller {
|
|
5
|
+
readonly id = "json-mcp";
|
|
6
|
+
readonly supportedFormats: ConfigFormat[];
|
|
7
|
+
install(options: McpInstallOptions, target: ExternalInstallTarget, tier: McpEnvironmentTier): Promise<McpInstallResult>;
|
|
8
|
+
isConfigured(manifest: ExternalHostManifest, global: boolean, target: ExternalInstallTarget): Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Remove the Vibes server entry. An absent file or entry is "not
|
|
11
|
+
* configured"; an unreadable or invalid file is refused typed, never
|
|
12
|
+
* reported as a generic read failure.
|
|
13
|
+
*/
|
|
14
|
+
uninstall(manifest: ExternalHostManifest, global: boolean, target: ExternalInstallTarget): Promise<InstallResult>;
|
|
15
|
+
getConfigPath(manifest: ExternalHostManifest, global: boolean, roots: ExternalInstallRoots): string;
|
|
16
|
+
private getConfigLocation;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=json-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-installer.d.ts","sourceRoot":"","sources":["../../../../src/plugins/installers/mcp/json-installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EACX,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAIN,KAAK,kBAAkB,EAEvB,MAAM,kBAAkB,CAAC;AAyC1B,qBAAa,gBAAiB,YAAW,YAAY;IACpD,QAAQ,CAAC,EAAE,cAAc;IACzB,QAAQ,CAAC,gBAAgB,EAAE,YAAY,EAAE,CAAqB;IACxD,OAAO,CACZ,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,kBAAkB,GACtB,OAAO,CAAC,gBAAgB,CAAC;IA+DtB,YAAY,CAAC,QAAQ,EAAE,oBAAoB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAcpH;;;;OAIG;IACG,SAAS,CAAC,QAAQ,EAAE,oBAAoB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC;IA0BvH,aAAa,CAAC,QAAQ,EAAE,oBAAoB,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,oBAAoB,GAAG,MAAM;IAMnG,OAAO,CAAC,iBAAiB;CASzB"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { resolvePathTemplate } from "../../../external-tool/path-template.js";
|
|
3
|
+
import { buildMcpConfig, getEnvironmentConfig, hasPublishedBearer, withIdentityChange } from "./environment.js";
|
|
4
|
+
import { anchorIdentityEnv, applyConfigTemplate, finalizeServerConfig, pinServerArgs } from "./server-config.js";
|
|
5
|
+
import { readMcpServerConfig, upsertMcpServerConfig, removeMcpServerConfig } from "./json-paths.js";
|
|
6
|
+
import { readConfigText, writeConfigAtomically } from "../config-file.js";
|
|
7
|
+
import { copyConfigObject, setOwn } from "../config-value.js";
|
|
8
|
+
import { parseHostConfig } from "../../../detection/config-document.js";
|
|
9
|
+
/** Manifests whose servers map sits under a literal dotted key (VS Code settings: "cline.mcpServers"). */
|
|
10
|
+
const LiteralDotsStyleSchema = z.object({ mcpPathStyle: z.literal('literal-dots') });
|
|
11
|
+
function usesLiteralDots(manifest) {
|
|
12
|
+
return LiteralDotsStyleSchema.safeParse(manifest.metadata).success;
|
|
13
|
+
}
|
|
14
|
+
/** The config document, or null when the file is absent; an unreadable or invalid one fails typed. */
|
|
15
|
+
async function readJsonConfig(target, configPath, format) {
|
|
16
|
+
const content = await readConfigText(target.fs, configPath);
|
|
17
|
+
return content === null ? null : parseHostConfig(content, configPath, format);
|
|
18
|
+
}
|
|
19
|
+
/** The server entry an install writes: pack override or environment default, pinned, identified, templated. */
|
|
20
|
+
function buildServerConfig(options, target, tier) {
|
|
21
|
+
const { manifest, global, projectDir, authToken, transport } = options;
|
|
22
|
+
const serverConfig = options.serverConfigOverride
|
|
23
|
+
? copyConfigObject(options.serverConfigOverride)
|
|
24
|
+
: buildMcpConfig(getEnvironmentConfig(tier, {
|
|
25
|
+
userHome: target.userHome,
|
|
26
|
+
vibesHome: target.vibesHome,
|
|
27
|
+
platform: target.platform,
|
|
28
|
+
localMcpUrl: tier.localMcpUrl
|
|
29
|
+
}), transport ?? 'stdio', authToken);
|
|
30
|
+
pinServerArgs(serverConfig, global ? undefined : projectDir);
|
|
31
|
+
anchorIdentityEnv(serverConfig, manifest, target.vibesHome);
|
|
32
|
+
applyConfigTemplate(serverConfig, manifest.integration.mcp?.configTemplate);
|
|
33
|
+
return finalizeServerConfig(serverConfig);
|
|
34
|
+
}
|
|
35
|
+
export class JsonMcpInstaller {
|
|
36
|
+
id = 'json-mcp';
|
|
37
|
+
supportedFormats = ['json', 'jsonc'];
|
|
38
|
+
async install(options, target, tier) {
|
|
39
|
+
const { manifest, global, dryRun, force, authToken, serverName } = options;
|
|
40
|
+
const configLocation = this.getConfigLocation(manifest, global, target.platform);
|
|
41
|
+
if (!configLocation) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
message: `No ${global ? 'global' : 'project'} JSON config defined for ${manifest.name}`,
|
|
45
|
+
error: 'NO_CONFIG_LOCATION',
|
|
46
|
+
configPath: '',
|
|
47
|
+
created: false,
|
|
48
|
+
updated: false,
|
|
49
|
+
serverName: ''
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const configPath = resolvePathTemplate(configLocation.path, target);
|
|
53
|
+
const mcpPath = configLocation.mcpPath || 'mcpServers';
|
|
54
|
+
const finalServerName = serverName || manifest.mcp.defaultServerName || 'vibes';
|
|
55
|
+
// Read the existing config. Only absence starts fresh: an unreadable or
|
|
56
|
+
// invalid user document is never overwritten.
|
|
57
|
+
const existing = await readJsonConfig(target, configPath, configLocation.format);
|
|
58
|
+
const config = existing ?? {};
|
|
59
|
+
const isUpdate = existing !== null;
|
|
60
|
+
// Some clients store MCP config under a literal dotted key (e.g. VS Code settings: "cline.mcpServers").
|
|
61
|
+
if (usesLiteralDots(manifest) && !Object.hasOwn(config, mcpPath))
|
|
62
|
+
setOwn(config, mcpPath, {});
|
|
63
|
+
const existingServer = readMcpServerConfig(config, mcpPath, finalServerName);
|
|
64
|
+
// A published bearer is removed on every reinstall, forced or not.
|
|
65
|
+
const removedPublishedBearer = hasPublishedBearer(existingServer);
|
|
66
|
+
if (existingServer && !force && !authToken && !removedPublishedBearer) {
|
|
67
|
+
return {
|
|
68
|
+
success: true,
|
|
69
|
+
message: `${manifest.name} MCP already configured. Use --force to overwrite.`,
|
|
70
|
+
configPath,
|
|
71
|
+
created: false,
|
|
72
|
+
updated: false,
|
|
73
|
+
serverName: finalServerName
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
upsertMcpServerConfig(config, mcpPath, finalServerName, buildServerConfig(options, target, tier));
|
|
77
|
+
if (!dryRun)
|
|
78
|
+
await writeConfigAtomically(target.fs, configPath, `${JSON.stringify(config, null, 2)}\n`);
|
|
79
|
+
const result = {
|
|
80
|
+
success: true,
|
|
81
|
+
message: withIdentityChange(dryRun
|
|
82
|
+
? `Would ${isUpdate ? 'update' : 'create'} ${manifest.name} MCP config at ${configPath}`
|
|
83
|
+
: `${isUpdate ? 'Updated' : 'Created'} ${manifest.name} MCP config at ${configPath}`, removedPublishedBearer),
|
|
84
|
+
configPath,
|
|
85
|
+
created: !isUpdate,
|
|
86
|
+
updated: isUpdate,
|
|
87
|
+
serverName: finalServerName
|
|
88
|
+
};
|
|
89
|
+
if (removedPublishedBearer)
|
|
90
|
+
result.removedPublishedBearer = true;
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
async isConfigured(manifest, global, target) {
|
|
94
|
+
const configLocation = this.getConfigLocation(manifest, global, target.platform);
|
|
95
|
+
if (!configLocation)
|
|
96
|
+
return false;
|
|
97
|
+
const configPath = resolvePathTemplate(configLocation.path, target);
|
|
98
|
+
const mcpPath = configLocation.mcpPath || 'mcpServers';
|
|
99
|
+
const serverName = manifest.mcp.defaultServerName || 'vibes';
|
|
100
|
+
const config = await readJsonConfig(target, configPath, configLocation.format);
|
|
101
|
+
if (!config)
|
|
102
|
+
return false;
|
|
103
|
+
if (usesLiteralDots(manifest) && !Object.hasOwn(config, mcpPath))
|
|
104
|
+
return false;
|
|
105
|
+
return readMcpServerConfig(config, mcpPath, serverName) !== undefined;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Remove the Vibes server entry. An absent file or entry is "not
|
|
109
|
+
* configured"; an unreadable or invalid file is refused typed, never
|
|
110
|
+
* reported as a generic read failure.
|
|
111
|
+
*/
|
|
112
|
+
async uninstall(manifest, global, target) {
|
|
113
|
+
const configLocation = this.getConfigLocation(manifest, global, target.platform);
|
|
114
|
+
if (!configLocation) {
|
|
115
|
+
return {
|
|
116
|
+
success: false,
|
|
117
|
+
message: `No ${global ? 'global' : 'project'} config defined`,
|
|
118
|
+
error: 'NO_CONFIG_LOCATION'
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const configPath = resolvePathTemplate(configLocation.path, target);
|
|
122
|
+
const mcpPath = configLocation.mcpPath || 'mcpServers';
|
|
123
|
+
const serverName = manifest.mcp.defaultServerName || 'vibes';
|
|
124
|
+
const config = await readJsonConfig(target, configPath, configLocation.format);
|
|
125
|
+
if (!config)
|
|
126
|
+
return { success: true, message: 'Vibes MCP not configured' };
|
|
127
|
+
if (usesLiteralDots(manifest) && !Object.hasOwn(config, mcpPath)) {
|
|
128
|
+
return { success: true, message: 'Vibes MCP not configured' };
|
|
129
|
+
}
|
|
130
|
+
if (!removeMcpServerConfig(config, mcpPath, serverName)) {
|
|
131
|
+
return { success: true, message: 'Vibes MCP not configured' };
|
|
132
|
+
}
|
|
133
|
+
await writeConfigAtomically(target.fs, configPath, `${JSON.stringify(config, null, 2)}\n`);
|
|
134
|
+
return { success: true, message: `Removed vibes MCP from ${configPath}` };
|
|
135
|
+
}
|
|
136
|
+
getConfigPath(manifest, global, roots) {
|
|
137
|
+
const configLocation = this.getConfigLocation(manifest, global, roots.platform);
|
|
138
|
+
if (!configLocation)
|
|
139
|
+
return '';
|
|
140
|
+
return resolvePathTemplate(configLocation.path, roots);
|
|
141
|
+
}
|
|
142
|
+
getConfigLocation(manifest, global, platform) {
|
|
143
|
+
const scope = global ? 'global' : 'project';
|
|
144
|
+
return manifest.configs.find((c) => {
|
|
145
|
+
if (c.scope !== scope)
|
|
146
|
+
return false;
|
|
147
|
+
if (!this.supportedFormats.includes(c.format))
|
|
148
|
+
return false;
|
|
149
|
+
if (!c.platform || c.platform === 'all')
|
|
150
|
+
return true;
|
|
151
|
+
return c.platform === platform;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=json-installer.js.map
|
|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AC;QAC5C,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YAClC,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK;gBAAE,OAAO,KAAK,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;gBAAE,OAAO,KAAK,CAAC;YAC5D,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,KAAK,KAAK;gBAAE,OAAO,IAAI,CAAC;YACrD,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC;QAChC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read, upsert and remove one MCP server entry in a parsed host config.
|
|
3
|
+
*
|
|
4
|
+
* `mcpPath` is the manifest's location of the servers map: a literal key
|
|
5
|
+
* (`cline.mcpServers` in VS Code settings), a dotted path (`mcp.servers`), or
|
|
6
|
+
* a path ending in an array segment (`mcp.servers[]`) whose entries carry a
|
|
7
|
+
* `name`. Every key is an own property (see config-value.ts).
|
|
8
|
+
*/
|
|
9
|
+
import { type ConfigObject } from '../config-value.ts';
|
|
10
|
+
export declare function readMcpServerConfig(config: ConfigObject, mcpPath: string, serverName: string): ConfigObject | undefined;
|
|
11
|
+
export declare function upsertMcpServerConfig(config: ConfigObject, mcpPath: string, serverName: string, serverConfig: ConfigObject): void;
|
|
12
|
+
export declare function removeMcpServerConfig(config: ConfigObject, mcpPath: string, serverName: string): boolean;
|
|
13
|
+
//# sourceMappingURL=json-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-paths.d.ts","sourceRoot":"","sources":["../../../../src/plugins/installers/mcp/json-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAMN,KAAK,YAAY,EAEjB,MAAM,oBAAoB,CAAC;AAgC5B,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAChB,YAAY,GAAG,SAAS,CAmB1B;AAED,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,GACxB,IAAI,CA6BN;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAgCxG"}
|