@vibesdotdev/external 0.0.0-stage → 1.0.0-rc.1
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 +73 -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 +988 -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 +203 -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 +146 -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 +111 -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 @@
|
|
|
1
|
+
{"version":3,"file":"strip-undefined.d.ts","sourceRoot":"","sources":["../../src/harness/strip-undefined.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErG,YAAY,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,CAG1E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility projection over Runtime's reader-to-wire JSON schema.
|
|
3
|
+
* Non-JSON values stay unchanged so the caller's output boundary can refuse
|
|
4
|
+
* them with its own error contract.
|
|
5
|
+
*/
|
|
6
|
+
import { JsonValueFromReaderSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
7
|
+
export function stripUndefined(value) {
|
|
8
|
+
const parsed = JsonValueFromReaderSchema.safeParse(value);
|
|
9
|
+
return parsed.success ? parsed.data : value;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=strip-undefined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-undefined.js","sourceRoot":"","sources":["../../src/harness/strip-undefined.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,yBAAyB,EAA0B,MAAM,kCAAkC,CAAC;AAIrG,MAAM,UAAU,cAAc,CAAC,KAAwB;IACtD,MAAM,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared tool projection: live `tools/tool` descriptors to host-neutral tool definitions.
|
|
3
|
+
*
|
|
4
|
+
* The runtime's `tools/tool` registry is the only catalog. This module is the
|
|
5
|
+
* single translation every host adapter uses: one runtime descriptor becomes one
|
|
6
|
+
* host-neutral tool carrying a real input schema, a typed output schema, approval
|
|
7
|
+
* gating, safety metadata, and a result card the host can render.
|
|
8
|
+
*
|
|
9
|
+
* It is pure — the caller supplies the invoke function (the runtime transport) —
|
|
10
|
+
* so it is testable without a host or a runtime.
|
|
11
|
+
*
|
|
12
|
+
* Host adapters (OpenCode, MCP, Pi, ACP) add only their own registration
|
|
13
|
+
* mechanics on top; they never reimplement normalization, approval, or schema
|
|
14
|
+
* translation.
|
|
15
|
+
*/
|
|
16
|
+
import { type HostToolInput, type LiveJson } from './live-tools.ts';
|
|
17
|
+
/** The descriptor shape the projection consumes; a subset of `tools/tool`. */
|
|
18
|
+
export type ProjectionToolDescriptor = {
|
|
19
|
+
id: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
/** MCP-specific one-liner; native host projections use the canonical description. */
|
|
23
|
+
mcpDescription?: string;
|
|
24
|
+
category?: string;
|
|
25
|
+
safety?: LiveJson;
|
|
26
|
+
requiresApproval?: boolean;
|
|
27
|
+
/** Published input JSON Schema (CLI `tools list` rows). */
|
|
28
|
+
inputSchema?: LiveJson;
|
|
29
|
+
/** Legacy harness parameter map, used only when no JSON Schema is published. */
|
|
30
|
+
parameters?: Record<string, {
|
|
31
|
+
type?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
choices?: readonly string[];
|
|
35
|
+
}>;
|
|
36
|
+
schemas?: {
|
|
37
|
+
input?: LiveJson;
|
|
38
|
+
output?: LiveJson;
|
|
39
|
+
actionSafety?: Record<string, string>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type ProjectionToolInvoke = (toolId: string, input: HostToolInput, context?: {
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
}) => Promise<LiveJson>;
|
|
45
|
+
/** The progress ping a projection sends while a tool runs. */
|
|
46
|
+
export type ProjectionProgressUpdate = {
|
|
47
|
+
phase: string;
|
|
48
|
+
vibesToolId: string;
|
|
49
|
+
};
|
|
50
|
+
export type ProjectionToolExecutionContext = {
|
|
51
|
+
signal?: AbortSignal;
|
|
52
|
+
progress?: (update: ProjectionProgressUpdate) => Promise<void> | void;
|
|
53
|
+
requestApproval?: (toolId: string, input: HostToolInput) => Promise<void>;
|
|
54
|
+
};
|
|
55
|
+
export type ProjectionToolOptions = {
|
|
56
|
+
namespace: string;
|
|
57
|
+
codemode: boolean;
|
|
58
|
+
pinned?: boolean;
|
|
59
|
+
permission?: string;
|
|
60
|
+
};
|
|
61
|
+
/** The result card a host renders: structured output, text, and provenance. */
|
|
62
|
+
export type ProjectionToolMetadata = {
|
|
63
|
+
vibesToolId: string;
|
|
64
|
+
category: string;
|
|
65
|
+
safety: LiveJson;
|
|
66
|
+
requiresApproval: boolean;
|
|
67
|
+
schemaSource: 'runtime-schema' | 'parameters' | 'none';
|
|
68
|
+
durationMs: number;
|
|
69
|
+
ok: boolean;
|
|
70
|
+
};
|
|
71
|
+
export type ProjectionToolResult = {
|
|
72
|
+
output: LiveJson;
|
|
73
|
+
content: string;
|
|
74
|
+
metadata: ProjectionToolMetadata;
|
|
75
|
+
};
|
|
76
|
+
export type ProjectionToolDefinition = {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
input: Record<string, LiveJson>;
|
|
80
|
+
output?: LiveJson;
|
|
81
|
+
options: ProjectionToolOptions;
|
|
82
|
+
safety?: LiveJson;
|
|
83
|
+
requiresApproval?: boolean;
|
|
84
|
+
schemas?: {
|
|
85
|
+
actionSafety?: Record<string, string>;
|
|
86
|
+
};
|
|
87
|
+
execute: (input: HostToolInput, context?: ProjectionToolExecutionContext) => Promise<ProjectionToolResult>;
|
|
88
|
+
};
|
|
89
|
+
export type ProjectionPolicy = {
|
|
90
|
+
/** Tools that stay directly callable instead of Code-Mode-only. */
|
|
91
|
+
pinned?: ReadonlySet<string>;
|
|
92
|
+
/** Drop descriptors that must not reach the host (internal, host-shadowing). */
|
|
93
|
+
include?: (descriptor: ProjectionToolDescriptor) => boolean;
|
|
94
|
+
/** Tool namespace for the host (default: 'vibes'). */
|
|
95
|
+
namespace?: string;
|
|
96
|
+
};
|
|
97
|
+
export type ProjectionResult = {
|
|
98
|
+
tools: ProjectionToolDefinition[];
|
|
99
|
+
names: string[];
|
|
100
|
+
skipped: {
|
|
101
|
+
id: string;
|
|
102
|
+
reason: string;
|
|
103
|
+
}[];
|
|
104
|
+
};
|
|
105
|
+
/** The host input schema a projection derives, and where it came from. */
|
|
106
|
+
export type ProjectionToolInput = {
|
|
107
|
+
schema: Record<string, LiveJson>;
|
|
108
|
+
source: 'runtime-schema' | 'parameters' | 'none';
|
|
109
|
+
};
|
|
110
|
+
export declare const DEFAULT_TOOL_NAMESPACE = "vibes";
|
|
111
|
+
/**
|
|
112
|
+
* Default hot set: called directly rather than through a Code Mode catalog.
|
|
113
|
+
* Keep this small — every pinned tool costs prompt budget on every request.
|
|
114
|
+
*/
|
|
115
|
+
export declare const DEFAULT_PINNED_TOOL_IDS: ReadonlySet<string>;
|
|
116
|
+
/** Canonical host name for a runtime tool id. Dots stay: identity is shared. */
|
|
117
|
+
export declare function projectionToolName(descriptor: Pick<ProjectionToolDescriptor, 'id'>): string;
|
|
118
|
+
/**
|
|
119
|
+
* Input schema for the host. Prefer the runtime's published JSON Schema (the same
|
|
120
|
+
* projection the native agent loop uses); degrade to the harness parameter map and
|
|
121
|
+
* say so in the description rather than silently accepting anything.
|
|
122
|
+
*/
|
|
123
|
+
export declare function buildProjectionToolInput(descriptor: ProjectionToolDescriptor): ProjectionToolInput;
|
|
124
|
+
export declare function projectTool(descriptor: ProjectionToolDescriptor, invoke: ProjectionToolInvoke, policy?: ProjectionPolicy): ProjectionToolDefinition;
|
|
125
|
+
/**
|
|
126
|
+
* Project the whole live catalog. One host tool per runtime descriptor; colliding
|
|
127
|
+
* ids are reported, never silently dropped or renamed.
|
|
128
|
+
*/
|
|
129
|
+
export declare function projectCatalog(catalog: readonly ProjectionToolDescriptor[], invoke: ProjectionToolInvoke, policy?: ProjectionPolicy): ProjectionResult;
|
|
130
|
+
//# sourceMappingURL=tool-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-projection.d.ts","sourceRoot":"","sources":["../../src/harness/tool-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAgC,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElG,8EAA8E;AAC9E,MAAM,MAAM,wBAAwB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF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utral tool definitions.
|
|
3
|
+
*
|
|
4
|
+
* The runtime's `tools/tool` registry is the only catalog. This module is the
|
|
5
|
+
* single translation every host adapter uses: one runtime descriptor becomes one
|
|
6
|
+
* host-neutral tool carrying a real input schema, a typed output schema, approval
|
|
7
|
+
* gating, safety metadata, and a result card the host can render.
|
|
8
|
+
*
|
|
9
|
+
* It is pure — the caller supplies the invoke function (the runtime transport) —
|
|
10
|
+
* so it is testable without a host or a runtime.
|
|
11
|
+
*
|
|
12
|
+
* Host adapters (OpenCode, MCP, Pi, ACP) add only their own registration
|
|
13
|
+
* mechanics on top; they never reimplement normalization, approval, or schema
|
|
14
|
+
* translation.
|
|
15
|
+
*/
|
|
16
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
17
|
+
import { JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
18
|
+
import { requiresExternalHostApproval } from "./live-tools.js";
|
|
19
|
+
export const DEFAULT_TOOL_NAMESPACE = 'vibes';
|
|
20
|
+
/**
|
|
21
|
+
* Default hot set: called directly rather than through a Code Mode catalog.
|
|
22
|
+
* Keep this small — every pinned tool costs prompt budget on every request.
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_PINNED_TOOL_IDS = new Set([
|
|
25
|
+
'session',
|
|
26
|
+
'workspace-fs',
|
|
27
|
+
'run-command',
|
|
28
|
+
'tool-search'
|
|
29
|
+
]);
|
|
30
|
+
const JSON_TYPES = new Map([
|
|
31
|
+
['string', 'string'],
|
|
32
|
+
['number', 'number'],
|
|
33
|
+
['integer', 'integer'],
|
|
34
|
+
['boolean', 'boolean'],
|
|
35
|
+
['array', 'array'],
|
|
36
|
+
['object', 'object']
|
|
37
|
+
]);
|
|
38
|
+
function isRecord(value) {
|
|
39
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
40
|
+
}
|
|
41
|
+
function isStringValue(value) {
|
|
42
|
+
return typeof value === 'string';
|
|
43
|
+
}
|
|
44
|
+
/** Canonical host name for a runtime tool id. Dots stay: identity is shared. */
|
|
45
|
+
export function projectionToolName(descriptor) {
|
|
46
|
+
return descriptor.id.trim();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Input schema for the host. Prefer the runtime's published JSON Schema (the same
|
|
50
|
+
* projection the native agent loop uses); degrade to the harness parameter map and
|
|
51
|
+
* say so in the description rather than silently accepting anything.
|
|
52
|
+
*/
|
|
53
|
+
export function buildProjectionToolInput(descriptor) {
|
|
54
|
+
const candidates = [descriptor.schemas?.input, descriptor.inputSchema];
|
|
55
|
+
const published = candidates.find((candidate) => isRecord(candidate) && candidate.type === 'object');
|
|
56
|
+
if (published) {
|
|
57
|
+
return { schema: published, source: 'runtime-schema' };
|
|
58
|
+
}
|
|
59
|
+
const entries = Object.entries(descriptor.parameters ?? {});
|
|
60
|
+
if (entries.length === 0) {
|
|
61
|
+
return { schema: { type: 'object', properties: {}, additionalProperties: false }, source: 'none' };
|
|
62
|
+
}
|
|
63
|
+
const properties = {};
|
|
64
|
+
const required = [];
|
|
65
|
+
for (const [key, meta] of entries) {
|
|
66
|
+
const property = {};
|
|
67
|
+
property.type = JSON_TYPES.get(meta?.type ?? 'string') ?? 'string';
|
|
68
|
+
if (meta?.description)
|
|
69
|
+
property.description = meta.description;
|
|
70
|
+
if (meta?.choices?.length) {
|
|
71
|
+
property.enum = [...meta.choices];
|
|
72
|
+
property.type = 'string';
|
|
73
|
+
}
|
|
74
|
+
properties[key] = property;
|
|
75
|
+
if (meta?.required)
|
|
76
|
+
required.push(key);
|
|
77
|
+
}
|
|
78
|
+
const schema = {};
|
|
79
|
+
schema.type = 'object';
|
|
80
|
+
schema.properties = properties;
|
|
81
|
+
schema.additionalProperties = false;
|
|
82
|
+
if (required.length)
|
|
83
|
+
schema.required = required;
|
|
84
|
+
return { schema, source: 'parameters' };
|
|
85
|
+
}
|
|
86
|
+
/** Human-readable result text. Never carries runtime log noise. */
|
|
87
|
+
function toContent(value) {
|
|
88
|
+
if (value === undefined || value === null)
|
|
89
|
+
return '';
|
|
90
|
+
if (isStringValue(value))
|
|
91
|
+
return value.trim();
|
|
92
|
+
return JSON.stringify(value);
|
|
93
|
+
}
|
|
94
|
+
/** A JSON payload from the runtime stays structured; anything else stays text. */
|
|
95
|
+
function parseStructured(value) {
|
|
96
|
+
if (!isStringValue(value))
|
|
97
|
+
return value;
|
|
98
|
+
const text = value.trim();
|
|
99
|
+
if (!text.startsWith('{') && !text.startsWith('['))
|
|
100
|
+
return undefined;
|
|
101
|
+
const parsed = JsonValueSchema.safeParse(text);
|
|
102
|
+
return parsed.success ? parsed.data : undefined;
|
|
103
|
+
}
|
|
104
|
+
export function projectTool(descriptor, invoke, policy = {}) {
|
|
105
|
+
const input = buildProjectionToolInput(descriptor);
|
|
106
|
+
const description = (descriptor.description || descriptor.mcpDescription || descriptor.id).trim();
|
|
107
|
+
const category = descriptor.category ?? 'vibes';
|
|
108
|
+
const namespace = policy.namespace ?? DEFAULT_TOOL_NAMESPACE;
|
|
109
|
+
const options = {
|
|
110
|
+
namespace,
|
|
111
|
+
codemode: true,
|
|
112
|
+
pinned: (policy.pinned ?? DEFAULT_PINNED_TOOL_IDS).has(descriptor.id),
|
|
113
|
+
permission: descriptor.id
|
|
114
|
+
};
|
|
115
|
+
const definition = {
|
|
116
|
+
name: projectionToolName(descriptor),
|
|
117
|
+
description: input.source === 'runtime-schema'
|
|
118
|
+
? description
|
|
119
|
+
: description + ' (untyped input: pass a JSON string in `input`)',
|
|
120
|
+
input: input.schema,
|
|
121
|
+
options,
|
|
122
|
+
execute: async (args, context) => {
|
|
123
|
+
const startedAt = Date.now();
|
|
124
|
+
await context?.progress?.({ phase: 'started', vibesToolId: descriptor.id });
|
|
125
|
+
try {
|
|
126
|
+
if (requiresExternalHostApproval(descriptor, args ?? {})) {
|
|
127
|
+
if (!context?.requestApproval) {
|
|
128
|
+
throw new Error('Blocked because host approval is unavailable for this tool');
|
|
129
|
+
}
|
|
130
|
+
await context.requestApproval(descriptor.id, args ?? {});
|
|
131
|
+
}
|
|
132
|
+
const raw = await invoke(descriptor.id, args ?? {}, { signal: context?.signal });
|
|
133
|
+
const structured = parseStructured(raw);
|
|
134
|
+
return {
|
|
135
|
+
output: structured ?? { result: toContent(raw) },
|
|
136
|
+
content: toContent(raw),
|
|
137
|
+
metadata: {
|
|
138
|
+
vibesToolId: descriptor.id,
|
|
139
|
+
category,
|
|
140
|
+
safety: descriptor.safety ?? 'unknown',
|
|
141
|
+
requiresApproval: descriptor.requiresApproval === true,
|
|
142
|
+
schemaSource: input.source,
|
|
143
|
+
durationMs: Date.now() - startedAt,
|
|
144
|
+
ok: true
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
150
|
+
throw new CapabilityError(descriptor.id + ' failed: ' + message, 'INTERNAL', {
|
|
151
|
+
reason: 'projected-tool-execution-failed',
|
|
152
|
+
cause: error
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
if (descriptor.schemas?.output !== undefined)
|
|
158
|
+
definition.output = descriptor.schemas.output;
|
|
159
|
+
if (descriptor.safety !== undefined)
|
|
160
|
+
definition.safety = descriptor.safety;
|
|
161
|
+
if (descriptor.requiresApproval !== undefined)
|
|
162
|
+
definition.requiresApproval = descriptor.requiresApproval;
|
|
163
|
+
if (descriptor.schemas?.actionSafety) {
|
|
164
|
+
definition.schemas = { actionSafety: descriptor.schemas.actionSafety };
|
|
165
|
+
}
|
|
166
|
+
return definition;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Project the whole live catalog. One host tool per runtime descriptor; colliding
|
|
170
|
+
* ids are reported, never silently dropped or renamed.
|
|
171
|
+
*/
|
|
172
|
+
export function projectCatalog(catalog, invoke, policy = {}) {
|
|
173
|
+
const tools = [];
|
|
174
|
+
const skipped = [];
|
|
175
|
+
const seen = new Set();
|
|
176
|
+
for (const descriptor of catalog) {
|
|
177
|
+
if (!descriptor?.id) {
|
|
178
|
+
skipped.push({ id: String(descriptor?.id ?? '<missing>'), reason: 'missing-id' });
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (policy.include && !policy.include(descriptor)) {
|
|
182
|
+
skipped.push({ id: descriptor.id, reason: 'excluded-by-policy' });
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
const name = projectionToolName(descriptor);
|
|
186
|
+
if (seen.has(name)) {
|
|
187
|
+
skipped.push({ id: descriptor.id, reason: 'duplicate-name' });
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
seen.add(name);
|
|
191
|
+
tools.push(projectTool(descriptor, invoke, policy));
|
|
192
|
+
}
|
|
193
|
+
return { tools, names: tools.map((tool) => tool.name), skipped };
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=tool-projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-projection.js","sourceRoot":"","sources":["../../src/harness/tool-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAqC,MAAM,iBAAiB,CAAC;AAiGlG,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC;IACnE,SAAS;IACT,cAAc;IACd,aAAa;IACb,aAAa;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAiB;IAC1C,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,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,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;YAClF,SAAS;QACV,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;YAClE,SAAS;QACV,CAAC;QACD,MAAM,IAAI,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;YAC9D,SAAS;QACV,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact rendering of native Zod issues. Each top-level issue keeps its full
|
|
3
|
+
* path; union alternatives stay one mismatch instead of becoming a branch dump.
|
|
4
|
+
*/
|
|
5
|
+
import * as z from 'zod/v4';
|
|
6
|
+
import { type CaughtFailure } from '@vibesdotdev/kernel';
|
|
7
|
+
/** Bound displayed issues while retaining the count of undisplayed mismatches. */
|
|
8
|
+
export declare function conciseZodIssues(issues: readonly z.core.$ZodIssue[], maxLines?: number): string[];
|
|
9
|
+
/** Preserve ordinary failure text; render a native Zod error without its union tree. */
|
|
10
|
+
export declare function conciseValidationFailure(error: CaughtFailure | string): string;
|
|
11
|
+
//# sourceMappingURL=validation-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-errors.d.ts","sourceRoot":"","sources":["../../src/harness/validation-errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,SAAK,GAAG,MAAM,EAAE,CAS7F;AAED,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,CAQ9E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact rendering of native Zod issues. Each top-level issue keeps its full
|
|
3
|
+
* path; union alternatives stay one mismatch instead of becoming a branch dump.
|
|
4
|
+
*/
|
|
5
|
+
import * as z from 'zod/v4';
|
|
6
|
+
import { CaughtFailureSchema } from '@vibesdotdev/kernel';
|
|
7
|
+
/** Bound displayed issues while retaining the count of undisplayed mismatches. */
|
|
8
|
+
export function conciseZodIssues(issues, maxLines = 10) {
|
|
9
|
+
const visible = issues.slice(0, maxLines);
|
|
10
|
+
const lines = visible.map((issue) => {
|
|
11
|
+
const path = z.core.toDotPath(issue.path) || '(root)';
|
|
12
|
+
return `${path}: ${issue.message}`;
|
|
13
|
+
});
|
|
14
|
+
const remaining = issues.length - visible.length;
|
|
15
|
+
if (remaining > 0)
|
|
16
|
+
lines.push(`${remaining} more issue${remaining === 1 ? '' : 's'}`);
|
|
17
|
+
return lines;
|
|
18
|
+
}
|
|
19
|
+
/** Preserve ordinary failure text; render a native Zod error without its union tree. */
|
|
20
|
+
export function conciseValidationFailure(error) {
|
|
21
|
+
const asString = z.string().safeParse(error);
|
|
22
|
+
if (asString.success)
|
|
23
|
+
return asString.data;
|
|
24
|
+
const failure = CaughtFailureSchema.parse(error);
|
|
25
|
+
if (!(failure instanceof z.ZodError))
|
|
26
|
+
return failure instanceof Error ? failure.message : failure.description;
|
|
27
|
+
if (failure.issues.length === 0)
|
|
28
|
+
return failure.message;
|
|
29
|
+
const lines = conciseZodIssues(failure.issues);
|
|
30
|
+
return `Schema mismatch (${failure.issues.length} issue${failure.issues.length === 1 ? '' : 's'}):\n ${lines.join('\n ')}`;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=validation-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-errors.js","sourceRoot":"","sources":["../../src/harness/validation-errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAE9E,kFAAkF;AAClF,MAAM,UAAU,gBAAgB,CAAC,MAAmC,EAAE,QAAQ,GAAG,EAAE;IAClF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC;QACtD,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACjD,IAAI,SAAS,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,cAAc,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACtF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,wBAAwB,CAAC,KAA6B;IACrE,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC7C,IAAI,QAAQ,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC,IAAI,CAAC;IAC3C,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC9G,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC;IACxD,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,oBAAoB,OAAO,CAAC,MAAM,CAAC,MAAM,SAAS,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;AAC9H,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, redacted summaries of a host tool's input and result for hook work.
|
|
3
|
+
*
|
|
4
|
+
* A host fires `tool.before`/`tool.after` on every tool call, and the result
|
|
5
|
+
* of a Read or a Bash is whatever the tool printed: a whole file, a build log.
|
|
6
|
+
* Hook work (brain tracking, the hook's own result) carries a summary of it,
|
|
7
|
+
* never the payload: top-level scalars are kept, strings are credential-
|
|
8
|
+
* redacted and cut to {@link MAX_STRING_CHARS}, nested values become a marker
|
|
9
|
+
* with their size, and at most {@link MAX_FIELDS} fields survive. The summary
|
|
10
|
+
* is a JSON object whatever the input was.
|
|
11
|
+
*/
|
|
12
|
+
import type { ExternalHookToolPayload } from './runtime.ts';
|
|
13
|
+
/** The longest string a summary keeps, in characters. */
|
|
14
|
+
export declare const MAX_STRING_CHARS = 512;
|
|
15
|
+
/** The most top-level fields a summary keeps. */
|
|
16
|
+
export declare const MAX_FIELDS = 24;
|
|
17
|
+
/** One summarized field. */
|
|
18
|
+
export type BoundedField = string | number | boolean | null | {
|
|
19
|
+
readonly omitted: 'array';
|
|
20
|
+
readonly length: number;
|
|
21
|
+
} | {
|
|
22
|
+
readonly omitted: 'object';
|
|
23
|
+
readonly keys: number;
|
|
24
|
+
} | {
|
|
25
|
+
readonly omitted: 'value';
|
|
26
|
+
};
|
|
27
|
+
/** A summary: a JSON object of bounded fields. */
|
|
28
|
+
export interface BoundedPayload {
|
|
29
|
+
[field: string]: BoundedField;
|
|
30
|
+
}
|
|
31
|
+
/** What a host hands a hook as a tool's input or result (`ExternalHookToolPayloadSchema` input/result). */
|
|
32
|
+
export type BoundedSource = ExternalHookToolPayload['input'];
|
|
33
|
+
/**
|
|
34
|
+
* Summarize a tool input or result. A top-level string or scalar becomes
|
|
35
|
+
* `{ value }`; an array becomes `{ items }` with its length; an object keeps
|
|
36
|
+
* its first {@link MAX_FIELDS} fields, each bounded, and counts the rest.
|
|
37
|
+
*/
|
|
38
|
+
export declare function boundToolPayload(source: BoundedSource): BoundedPayload;
|
|
39
|
+
//# sourceMappingURL=bounded-payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-payload.d.ts","sourceRoot":"","sources":["../../src/hooks/bounded-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,iDAAiD;AACjD,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GACrB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjC,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC9B,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;CAC9B;AAmCD,2GAA2G;AAC3G,MAAM,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAYtE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, redacted summaries of a host tool's input and result for hook work.
|
|
3
|
+
*
|
|
4
|
+
* A host fires `tool.before`/`tool.after` on every tool call, and the result
|
|
5
|
+
* of a Read or a Bash is whatever the tool printed: a whole file, a build log.
|
|
6
|
+
* Hook work (brain tracking, the hook's own result) carries a summary of it,
|
|
7
|
+
* never the payload: top-level scalars are kept, strings are credential-
|
|
8
|
+
* redacted and cut to {@link MAX_STRING_CHARS}, nested values become a marker
|
|
9
|
+
* with their size, and at most {@link MAX_FIELDS} fields survive. The summary
|
|
10
|
+
* is a JSON object whatever the input was.
|
|
11
|
+
*/
|
|
12
|
+
import { redactCredentials } from '@vibesdotdev/shared/utils';
|
|
13
|
+
/** The longest string a summary keeps, in characters. */
|
|
14
|
+
export const MAX_STRING_CHARS = 512;
|
|
15
|
+
/** The most top-level fields a summary keeps. */
|
|
16
|
+
export const MAX_FIELDS = 24;
|
|
17
|
+
function boundedString(text) {
|
|
18
|
+
const redacted = redactCredentials(text);
|
|
19
|
+
return redacted.length > MAX_STRING_CHARS
|
|
20
|
+
? `${redacted.slice(0, MAX_STRING_CHARS)}… [${redacted.length - MAX_STRING_CHARS} more chars]`
|
|
21
|
+
: redacted;
|
|
22
|
+
}
|
|
23
|
+
function isStringValue(value) {
|
|
24
|
+
return typeof value === 'string';
|
|
25
|
+
}
|
|
26
|
+
function isNumberValue(value) {
|
|
27
|
+
return typeof value === 'number';
|
|
28
|
+
}
|
|
29
|
+
function isBooleanValue(value) {
|
|
30
|
+
return typeof value === 'boolean';
|
|
31
|
+
}
|
|
32
|
+
function isRecordValue(value) {
|
|
33
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
34
|
+
}
|
|
35
|
+
function boundedField(value) {
|
|
36
|
+
if (value === null)
|
|
37
|
+
return null;
|
|
38
|
+
if (Array.isArray(value))
|
|
39
|
+
return { omitted: 'array', length: value.length };
|
|
40
|
+
if (isStringValue(value))
|
|
41
|
+
return boundedString(value);
|
|
42
|
+
if (isNumberValue(value))
|
|
43
|
+
return Number.isFinite(value) ? value : null;
|
|
44
|
+
if (isBooleanValue(value))
|
|
45
|
+
return value;
|
|
46
|
+
if (isRecordValue(value))
|
|
47
|
+
return { omitted: 'object', keys: Object.keys(value).length };
|
|
48
|
+
return { omitted: 'value' };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Summarize a tool input or result. A top-level string or scalar becomes
|
|
52
|
+
* `{ value }`; an array becomes `{ items }` with its length; an object keeps
|
|
53
|
+
* its first {@link MAX_FIELDS} fields, each bounded, and counts the rest.
|
|
54
|
+
*/
|
|
55
|
+
export function boundToolPayload(source) {
|
|
56
|
+
if (source === undefined)
|
|
57
|
+
return {};
|
|
58
|
+
if (!isRecordValue(source)) {
|
|
59
|
+
return { value: boundedField(source) };
|
|
60
|
+
}
|
|
61
|
+
const entries = Object.entries(source);
|
|
62
|
+
const payload = {};
|
|
63
|
+
for (const [key, value] of entries.slice(0, MAX_FIELDS)) {
|
|
64
|
+
Object.defineProperty(payload, key, { value: boundedField(value), enumerable: true, writable: true, configurable: true });
|
|
65
|
+
}
|
|
66
|
+
if (entries.length > MAX_FIELDS)
|
|
67
|
+
payload.omittedFields = entries.length - MAX_FIELDS;
|
|
68
|
+
return payload;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=bounded-payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-payload.js","sourceRoot":"","sources":["../../src/hooks/bounded-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,yDAAyD;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACpC,iDAAiD;AACjD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAiB7B,SAAS,aAAa,CAAC,IAAY;IAClC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC,MAAM,GAAG,gBAAgB;QACxC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,QAAQ,CAAC,MAAM,GAAG,gBAAgB,cAAc;QAC9F,CAAC,CAAC,QAAQ,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,KAAoB;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAED,SAAS,aAAa,CAAC,KAAoB;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAED,SAAS,cAAc,CAAC,KAAoB;IAC3C,OAAO,OAAO,KAAK,KAAK,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AAC;IACnC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC;QACzD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3H,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,UAAU;QAAE,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC;IACrF,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional bridge from external host hooks → `tools/tool` hook bus.
|
|
3
|
+
*
|
|
4
|
+
* When the collaboration config's `toolTiers.enabled` is set, PreToolUse /
|
|
5
|
+
* PostToolUse run tier-enforcement subscribers against resolved universal tool
|
|
6
|
+
* IDs (e.g. vibes MCP tool names). Config, not the environment: the hook runs in
|
|
7
|
+
* the workspace daemon, whose environment is not the user's shell.
|
|
8
|
+
*/
|
|
9
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
10
|
+
import type { HookEvent } from '../plugins/schemas/manifest.ts';
|
|
11
|
+
import type { CollaborationSettings } from '../ambient/collaboration-settings.ts';
|
|
12
|
+
/** The tier-enforcement settings a bridge run applies (the collaboration config's `toolTiers`). */
|
|
13
|
+
export type HookToolTierSettings = CollaborationSettings['toolTiers'];
|
|
14
|
+
/**
|
|
15
|
+
* Resolve a host-reported tool name to a `tools/tool` descriptor id, if any.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveVibesToolId(runtime: VibesRuntime, hostToolName: string): string | null;
|
|
18
|
+
export interface HookBridgeInput {
|
|
19
|
+
event: HookEvent;
|
|
20
|
+
hostToolName?: string;
|
|
21
|
+
toolInput?: unknown;
|
|
22
|
+
toolResult?: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface HookBridgeResult {
|
|
25
|
+
bridged: boolean;
|
|
26
|
+
toolId?: string;
|
|
27
|
+
denied?: boolean;
|
|
28
|
+
message?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Emit `tools/tool` bus events for host hook events (tier enforcement only; no impl.execute).
|
|
32
|
+
*/
|
|
33
|
+
export declare function runHookToolBridge(runtime: VibesRuntime, input: HookBridgeInput, tiers: HookToolTierSettings): Promise<HookBridgeResult>;
|
|
34
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/hooks/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQ3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAElF,mGAAmG;AACnG,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAMtE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiB7F;AAED,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAoD3B"}
|