@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,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default `external/touch-projection` — batched, debounced, best-effort push
|
|
3
|
+
* of file touches to the platform, plus a bounded cross-machine read.
|
|
4
|
+
*
|
|
5
|
+
* THE RULES THIS FILE EXISTS TO KEEP
|
|
6
|
+
*
|
|
7
|
+
* - NOTHING HERE MAY SLOW AN EDIT. `project()` is synchronous and returns
|
|
8
|
+
* immediately; the flush happens on a timer. `peersForPath()` is time-boxed
|
|
9
|
+
* well under the fs settle budget.
|
|
10
|
+
* - OFFLINE IS A NORMAL STATE, NOT AN ERROR. No retries pile up, no queue
|
|
11
|
+
* grows without bound, nothing is surfaced to the user. A machine that never
|
|
12
|
+
* reaches the network keeps working with local-only collisions.
|
|
13
|
+
* - ONLY EXPLICIT PATH/IDENTITY FIELDS LEAVE THE MACHINE. The payload is built
|
|
14
|
+
* by picking fields through a `.strict()` schema — never by spreading a
|
|
15
|
+
* record. Contents, diffs, and arbitrary metadata remain local.
|
|
16
|
+
* - DISABLE-ABLE. No configured origin means this silently does nothing, which
|
|
17
|
+
* is the zero-telemetry posture.
|
|
18
|
+
*/
|
|
19
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
20
|
+
import type { TouchPeer } from '../schemas/collision.ts';
|
|
21
|
+
import { type ProjectedTouch, type TouchProjectionImplementation } from '../schemas/touch-projection.ts';
|
|
22
|
+
import { type AmbientRuntime } from './cloud-authenticated-json.ts';
|
|
23
|
+
export declare class CloudTouchProjection implements TouchProjectionImplementation {
|
|
24
|
+
private readonly runtime;
|
|
25
|
+
private queue;
|
|
26
|
+
private disposed;
|
|
27
|
+
/** The debounce timer, owned by the runtime's lifecycle (cleared on dispose). */
|
|
28
|
+
private timer;
|
|
29
|
+
private oldestQueuedAt;
|
|
30
|
+
private inFlight;
|
|
31
|
+
/** `runtime` is the one whose caller's bearer every request presents. */
|
|
32
|
+
constructor(runtime: AmbientRuntime);
|
|
33
|
+
project(touches: ProjectedTouch[]): void;
|
|
34
|
+
/**
|
|
35
|
+
* A flush nobody awaits (debounce or age trigger). Its failure is reported
|
|
36
|
+
* with its reason, never dropped as an unhandled rejection; the batch stays
|
|
37
|
+
* local, as an unauthenticated flush's does.
|
|
38
|
+
*/
|
|
39
|
+
private flushInBackground;
|
|
40
|
+
dispose(): void;
|
|
41
|
+
flush(): Promise<void>;
|
|
42
|
+
peersForPath(input: {
|
|
43
|
+
filePath: string;
|
|
44
|
+
workspaceRoot?: string;
|
|
45
|
+
excludeSessionId: string;
|
|
46
|
+
since: Date;
|
|
47
|
+
limit?: number;
|
|
48
|
+
}): Promise<TouchPeer[]>;
|
|
49
|
+
}
|
|
50
|
+
/** Build the wire payload by PICKING fields — never by spreading a record. */
|
|
51
|
+
export declare function toProjectedTouch(input: {
|
|
52
|
+
sessionId: string;
|
|
53
|
+
filePath: string;
|
|
54
|
+
operation: ProjectedTouch['operation'];
|
|
55
|
+
timestamp: Date;
|
|
56
|
+
machineId?: string;
|
|
57
|
+
machineName?: string;
|
|
58
|
+
participantId?: string;
|
|
59
|
+
participantSlug?: string;
|
|
60
|
+
workspaceRoot?: string;
|
|
61
|
+
gitBranch?: string;
|
|
62
|
+
workItemId?: string;
|
|
63
|
+
workItemTitle?: string;
|
|
64
|
+
}): ProjectedTouch;
|
|
65
|
+
/** One projector owned by the activated runtime client, shared across tool calls. */
|
|
66
|
+
export declare function getCloudTouchProjection(runtime: VibesRuntime): CloudTouchProjection;
|
|
67
|
+
/**
|
|
68
|
+
* Resolve the configured projection, falling back to the built-in cloud one
|
|
69
|
+
* when no provider is registered. A registered provider whose loader fails
|
|
70
|
+
* propagates: every caller reads through `attempt()`, so the edit stays local.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveTouchProjection(runtime: VibesRuntime): Promise<TouchProjectionImplementation>;
|
|
73
|
+
export default CloudTouchProjection;
|
|
74
|
+
//# sourceMappingURL=cloud-touch-projection.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-touch-projection.impl.d.ts","sourceRoot":"","sources":["../../src/ambient/cloud-touch-projection.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAkE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAEN,KAAK,cAAc,EACnB,KAAK,6BAA6B,EAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAKN,KAAK,cAAc,EACnB,MAAM,+BAA+B,CAAC;AAmBvC,qBAAa,oBAAqB,YAAW,6BAA6B;IAS7D,OAAO,CAAC,QAAQ,CAAC,OAAO;IARpC,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,QAAQ,CAAS;IACzB,iFAAiF;IACjF,OAAO,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ED,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default `external/touch-projection` — batched, debounced, best-effort push
|
|
3
|
+
* of file touches to the platform, plus a bounded cross-machine read.
|
|
4
|
+
*
|
|
5
|
+
* THE RULES THIS FILE EXISTS TO KEEP
|
|
6
|
+
*
|
|
7
|
+
* - NOTHING HERE MAY SLOW AN EDIT. `project()` is synchronous and returns
|
|
8
|
+
* immediately; the flush happens on a timer. `peersForPath()` is time-boxed
|
|
9
|
+
* well under the fs settle budget.
|
|
10
|
+
* - OFFLINE IS A NORMAL STATE, NOT AN ERROR. No retries pile up, no queue
|
|
11
|
+
* grows without bound, nothing is surfaced to the user. A machine that never
|
|
12
|
+
* reaches the network keeps working with local-only collisions.
|
|
13
|
+
* - ONLY EXPLICIT PATH/IDENTITY FIELDS LEAVE THE MACHINE. The payload is built
|
|
14
|
+
* by picking fields through a `.strict()` schema — never by spreading a
|
|
15
|
+
* record. Contents, diffs, and arbitrary metadata remain local.
|
|
16
|
+
* - DISABLE-ABLE. No configured origin means this silently does nothing, which
|
|
17
|
+
* is the zero-telemetry posture.
|
|
18
|
+
*/
|
|
19
|
+
import { activeExternalClient } from "./pending-notices.js";
|
|
20
|
+
import * as z from 'zod/v4';
|
|
21
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
22
|
+
import { CaughtFailureSchema, isCapabilityError } from '@vibesdotdev/kernel';
|
|
23
|
+
import { ProjectedTouchSchema } from "../schemas/touch-projection.js";
|
|
24
|
+
import { ambientProjectionOptedOut, requestAmbientJson, resolveAmbientBearer, resolveAmbientOrigin } from "./cloud-authenticated-json.js";
|
|
25
|
+
/** Debounce window. Rapid editing produces ONE request, not one per keystroke. */
|
|
26
|
+
const FLUSH_DEBOUNCE_MS = 2_000;
|
|
27
|
+
/** Upper bound on how long a touch waits before being sent. */
|
|
28
|
+
const MAX_BATCH_AGE_MS = 10_000;
|
|
29
|
+
/** Never let an offline queue grow without bound; oldest are dropped. */
|
|
30
|
+
const MAX_QUEUE = 200;
|
|
31
|
+
/** The remote read is on the fs hot path. Give up fast and stay local. */
|
|
32
|
+
const READ_TIMEOUT_MS = 400;
|
|
33
|
+
/** The push is off the hot path but must not hang a process at exit. */
|
|
34
|
+
const PUSH_TIMEOUT_MS = 5_000;
|
|
35
|
+
const PROJECT_PATH = '/api/ambient/touches';
|
|
36
|
+
const PEERS_PATH = '/api/ambient/peers';
|
|
37
|
+
/** The peers envelope with entries still unvalidated: one corrupt row must not blind the reader. */
|
|
38
|
+
const TouchPeersEnvelopeSchema = z.object({ peers: z.array(z.unknown()) });
|
|
39
|
+
export class CloudTouchProjection {
|
|
40
|
+
runtime;
|
|
41
|
+
queue = [];
|
|
42
|
+
disposed = false;
|
|
43
|
+
/** The debounce timer, owned by the runtime's lifecycle (cleared on dispose). */
|
|
44
|
+
timer = null;
|
|
45
|
+
oldestQueuedAt = 0;
|
|
46
|
+
inFlight = null;
|
|
47
|
+
/** `runtime` is the one whose caller's bearer every request presents. */
|
|
48
|
+
constructor(runtime) {
|
|
49
|
+
this.runtime = runtime;
|
|
50
|
+
}
|
|
51
|
+
project(touches) {
|
|
52
|
+
if (this.disposed || touches.length === 0)
|
|
53
|
+
return;
|
|
54
|
+
// project() stays sync: queue and debounce. Opt-out, bearer, and origin
|
|
55
|
+
// are async and resolved at flush. A flush that sees `off` drops the
|
|
56
|
+
// batch without sending; a later `on` is picked up on the next flush.
|
|
57
|
+
if (this.queue.length === 0)
|
|
58
|
+
this.oldestQueuedAt = Date.now();
|
|
59
|
+
this.queue.push(...touches);
|
|
60
|
+
// Bounded queue. An agent editing offline for an hour must not grow a
|
|
61
|
+
// queue it will later dump in one enormous request.
|
|
62
|
+
if (this.queue.length > MAX_QUEUE) {
|
|
63
|
+
this.queue = this.queue.slice(-MAX_QUEUE);
|
|
64
|
+
}
|
|
65
|
+
const age = Date.now() - this.oldestQueuedAt;
|
|
66
|
+
if (age >= MAX_BATCH_AGE_MS) {
|
|
67
|
+
this.flushInBackground();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.timer?.();
|
|
71
|
+
this.timer = this.runtime.lifecycle.timeout(() => this.flushInBackground(), FLUSH_DEBOUNCE_MS);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A flush nobody awaits (debounce or age trigger). Its failure is reported
|
|
75
|
+
* with its reason, never dropped as an unhandled rejection; the batch stays
|
|
76
|
+
* local, as an unauthenticated flush's does.
|
|
77
|
+
*/
|
|
78
|
+
flushInBackground() {
|
|
79
|
+
this.flush().catch((error) => {
|
|
80
|
+
const failure = CaughtFailureSchema.parse(error);
|
|
81
|
+
getLogger('external.ambient.projection', this.runtime).warn('touch projection flush failed', {
|
|
82
|
+
reason: isCapabilityError(failure) ? (failure.reason ?? 'unknown') : 'unknown',
|
|
83
|
+
error: failure instanceof Error ? failure.message : String(failure)
|
|
84
|
+
});
|
|
85
|
+
return failure;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
dispose() {
|
|
89
|
+
this.disposed = true;
|
|
90
|
+
this.timer?.();
|
|
91
|
+
this.timer = null;
|
|
92
|
+
this.queue = [];
|
|
93
|
+
this.oldestQueuedAt = 0;
|
|
94
|
+
}
|
|
95
|
+
async flush() {
|
|
96
|
+
if (this.disposed)
|
|
97
|
+
return;
|
|
98
|
+
if (this.timer) {
|
|
99
|
+
this.timer();
|
|
100
|
+
this.timer = null;
|
|
101
|
+
}
|
|
102
|
+
if (await ambientProjectionOptedOut(this.runtime)) {
|
|
103
|
+
this.queue = [];
|
|
104
|
+
this.oldestQueuedAt = 0;
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (this.inFlight)
|
|
108
|
+
return this.inFlight;
|
|
109
|
+
const batch = this.queue;
|
|
110
|
+
if (batch.length === 0)
|
|
111
|
+
return;
|
|
112
|
+
this.queue = [];
|
|
113
|
+
this.oldestQueuedAt = 0;
|
|
114
|
+
const origin = await resolveAmbientOrigin(this.runtime);
|
|
115
|
+
const token = await resolveAmbientBearer(this.runtime);
|
|
116
|
+
if (!origin || !token)
|
|
117
|
+
return;
|
|
118
|
+
this.inFlight = (async () => {
|
|
119
|
+
const result = await requestAmbientJson(this.runtime, PROJECT_PATH, {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
body: { touches: batch },
|
|
122
|
+
timeoutMs: PUSH_TIMEOUT_MS
|
|
123
|
+
});
|
|
124
|
+
if (!result.ok) {
|
|
125
|
+
// Deliberately NOT re-queued. A retry storm after an outage is
|
|
126
|
+
// worse than a gap in an ephemeral, rolling window.
|
|
127
|
+
getLogger('external.ambient.projection', this.runtime).debug('touch projection dropped a batch (offline or rejected)', {
|
|
128
|
+
count: batch.length,
|
|
129
|
+
status: result.status,
|
|
130
|
+
error: result.failure
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
})().finally(() => {
|
|
134
|
+
this.inFlight = null;
|
|
135
|
+
});
|
|
136
|
+
return this.inFlight;
|
|
137
|
+
}
|
|
138
|
+
async peersForPath(input) {
|
|
139
|
+
if (await ambientProjectionOptedOut(this.runtime))
|
|
140
|
+
return [];
|
|
141
|
+
const origin = await resolveAmbientOrigin(this.runtime);
|
|
142
|
+
const token = await resolveAmbientBearer(this.runtime);
|
|
143
|
+
if (!origin || !token)
|
|
144
|
+
return [];
|
|
145
|
+
const now = Date.now();
|
|
146
|
+
const response = await requestAmbientJson(this.runtime, PEERS_PATH, {
|
|
147
|
+
method: 'POST',
|
|
148
|
+
body: {
|
|
149
|
+
filePath: input.filePath,
|
|
150
|
+
workspaceRoot: input.workspaceRoot,
|
|
151
|
+
excludeSessionId: input.excludeSessionId,
|
|
152
|
+
sinceMs: Math.max(1, now - input.since.getTime()),
|
|
153
|
+
limit: input.limit ?? 8
|
|
154
|
+
},
|
|
155
|
+
timeoutMs: READ_TIMEOUT_MS
|
|
156
|
+
});
|
|
157
|
+
const body = response.ok ? response.body : null;
|
|
158
|
+
const envelope = TouchPeersEnvelopeSchema.safeParse(body);
|
|
159
|
+
const raw = envelope.success ? envelope.data.peers : [];
|
|
160
|
+
const peers = [];
|
|
161
|
+
for (const entry of raw) {
|
|
162
|
+
const parsed = ProjectedTouchSchema.safeParse(entry);
|
|
163
|
+
if (!parsed.success)
|
|
164
|
+
continue;
|
|
165
|
+
const touch = parsed.data;
|
|
166
|
+
// Trust nothing from the wire about identity we can check locally.
|
|
167
|
+
if (touch.sessionId === input.excludeSessionId)
|
|
168
|
+
continue;
|
|
169
|
+
peers.push({
|
|
170
|
+
sessionId: touch.sessionId,
|
|
171
|
+
machineId: touch.machineId,
|
|
172
|
+
machineName: touch.machineName,
|
|
173
|
+
participantId: touch.participantId,
|
|
174
|
+
participantSlug: touch.participantSlug,
|
|
175
|
+
workspaceRoot: touch.workspaceRoot,
|
|
176
|
+
gitBranch: touch.gitBranch,
|
|
177
|
+
workItemId: touch.workItemId,
|
|
178
|
+
workItemTitle: touch.workItemTitle,
|
|
179
|
+
operation: touch.operation,
|
|
180
|
+
filePath: touch.filePath,
|
|
181
|
+
timestamp: touch.timestamp,
|
|
182
|
+
ageMs: Math.max(0, now - touch.timestamp.getTime()),
|
|
183
|
+
origin: 'remote'
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return peers;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/** Build the wire payload by PICKING fields — never by spreading a record. */
|
|
190
|
+
export function toProjectedTouch(input) {
|
|
191
|
+
return ProjectedTouchSchema.parse({
|
|
192
|
+
sessionId: input.sessionId,
|
|
193
|
+
filePath: input.filePath,
|
|
194
|
+
operation: input.operation,
|
|
195
|
+
timestamp: input.timestamp,
|
|
196
|
+
machineId: input.machineId,
|
|
197
|
+
machineName: input.machineName,
|
|
198
|
+
participantId: input.participantId,
|
|
199
|
+
participantSlug: input.participantSlug,
|
|
200
|
+
workspaceRoot: input.workspaceRoot,
|
|
201
|
+
gitBranch: input.gitBranch,
|
|
202
|
+
workItemId: input.workItemId,
|
|
203
|
+
workItemTitle: input.workItemTitle
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/** One projector owned by the activated runtime client, shared across tool calls. */
|
|
207
|
+
export function getCloudTouchProjection(runtime) {
|
|
208
|
+
return activeExternalClient(runtime).getCloudTouchProjection();
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Resolve the configured projection, falling back to the built-in cloud one
|
|
212
|
+
* when no provider is registered. A registered provider whose loader fails
|
|
213
|
+
* propagates: every caller reads through `attempt()`, so the edit stays local.
|
|
214
|
+
*/
|
|
215
|
+
export async function resolveTouchProjection(runtime) {
|
|
216
|
+
const provided = runtime.hasKind('external/touch-projection') &&
|
|
217
|
+
runtime.query('external/touch-projection').descriptors().length > 0;
|
|
218
|
+
if (!provided) {
|
|
219
|
+
getLogger('external.ambient.projection', runtime).debug('touch projection descriptor unresolved; using default');
|
|
220
|
+
return getCloudTouchProjection(runtime);
|
|
221
|
+
}
|
|
222
|
+
return runtime.query('external/touch-projection').resolve();
|
|
223
|
+
}
|
|
224
|
+
export default CloudTouchProjection;
|
|
225
|
+
//# sourceMappingURL=cloud-touch-projection.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-touch-projection.impl.js","sourceRoot":"","sources":["../../src/ambient/cloud-touch-projection.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAA6C,MAAM,qBAAqB,CAAC;AAGxH,OAAO,EACN,oBAAoB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACN,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EAEpB,MAAM,+BAA+B,CAAC;AA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,CAAC,OAAO,EAAE,CAAC;AAC/G,CAAC;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaboration settings: how the hook bridge turns a harness's native work
|
|
3
|
+
* into shared state (locks, notices, messages) and how often it nudges a
|
|
4
|
+
* self-review. They live in the `external` config manifest under
|
|
5
|
+
* `collaboration`; every field has a default, so a project that sets nothing
|
|
6
|
+
* gets the whole behavior.
|
|
7
|
+
*/
|
|
8
|
+
import * as z from 'zod/v4';
|
|
9
|
+
import type { RuntimeRef } from '@vibesdotdev/kernel';
|
|
10
|
+
/** Native edit tools of the supported harnesses: Claude Code, then Codex. */
|
|
11
|
+
export declare const DEFAULT_NATIVE_EDIT_TOOLS: readonly ["Edit", "Write", "MultiEdit", "NotebookEdit", "apply_patch"];
|
|
12
|
+
/** The self-review prompt descriptor a nudge injects unless configured otherwise. */
|
|
13
|
+
export declare const DEFAULT_SELF_REVIEW_PROMPT_ID = "guardrails.self-review";
|
|
14
|
+
export declare const CollaborationSettingsSchema: z.ZodObject<{
|
|
15
|
+
nativeEditLocks: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
nativeEditLockConflict: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
notice: "notice";
|
|
18
|
+
refuse: "refuse";
|
|
19
|
+
}>>;
|
|
20
|
+
editTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
21
|
+
lockTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
ambientDelivery: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
selfReviewEveryEdits: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
selfReviewAtStop: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
selfReviewPromptId: z.ZodDefault<z.ZodString>;
|
|
26
|
+
toolTiers: z.ZodPrefault<z.ZodObject<{
|
|
27
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
tier: z.ZodDefault<z.ZodEnum<{
|
|
29
|
+
default: "default";
|
|
30
|
+
full: "full";
|
|
31
|
+
minimal: "minimal";
|
|
32
|
+
recommended: "recommended";
|
|
33
|
+
}>>;
|
|
34
|
+
ceiling: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
0: "0";
|
|
36
|
+
1: "1";
|
|
37
|
+
3: "3";
|
|
38
|
+
"2a": "2a";
|
|
39
|
+
"2b": "2b";
|
|
40
|
+
}>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type CollaborationSettings = z.infer<typeof CollaborationSettingsSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* The collaboration settings on `runtime`: the `external` manifest's
|
|
46
|
+
* `collaboration` value parsed with its defaults, or the defaults alone when
|
|
47
|
+
* the runtime composes no `external` manifest.
|
|
48
|
+
*/
|
|
49
|
+
export declare function readCollaborationSettings(runtime: RuntimeRef): Promise<CollaborationSettings>;
|
|
50
|
+
//# sourceMappingURL=collaboration-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-settings.d.ts","sourceRoot":"","sources":["../../src/ambient/collaboration-settings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,wEAAyE,CAAC;AAEhH,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AAEtE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAKhF;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAMnG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaboration settings: how the hook bridge turns a harness's native work
|
|
3
|
+
* into shared state (locks, notices, messages) and how often it nudges a
|
|
4
|
+
* self-review. They live in the `external` config manifest under
|
|
5
|
+
* `collaboration`; every field has a default, so a project that sets nothing
|
|
6
|
+
* gets the whole behavior.
|
|
7
|
+
*/
|
|
8
|
+
import * as z from 'zod/v4';
|
|
9
|
+
import { ConfigManifest } from '@vibesdotdev/config/manifest/config-manifest';
|
|
10
|
+
/** Longest lease a hook-taken lock asks for (the lock registry's own maximum). */
|
|
11
|
+
const MAX_HOOK_LOCK_TTL_MS = 4 * 60 * 60_000;
|
|
12
|
+
/** Native edit tools of the supported harnesses: Claude Code, then Codex. */
|
|
13
|
+
export const DEFAULT_NATIVE_EDIT_TOOLS = ['Edit', 'Write', 'MultiEdit', 'NotebookEdit', 'apply_patch'];
|
|
14
|
+
/** The self-review prompt descriptor a nudge injects unless configured otherwise. */
|
|
15
|
+
export const DEFAULT_SELF_REVIEW_PROMPT_ID = 'guardrails.self-review';
|
|
16
|
+
export const CollaborationSettingsSchema = z.object({
|
|
17
|
+
/** A native edit takes (or renews) a workspace lock on each path it writes. */
|
|
18
|
+
nativeEditLocks: z.boolean().default(true),
|
|
19
|
+
/** When another participant holds a path the edit writes: `notice` lets the edit run and tells both sides; `refuse` stops it. */
|
|
20
|
+
nativeEditLockConflict: z.enum(['notice', 'refuse']).default('notice'),
|
|
21
|
+
/** Host tool names that write files. A tool input carrying an `apply_patch` envelope counts as an edit whatever its name. */
|
|
22
|
+
editTools: z.array(z.string().min(1)).default([...DEFAULT_NATIVE_EDIT_TOOLS]),
|
|
23
|
+
/** Lease window for a hook-taken lock; the lock registry's default when unset. */
|
|
24
|
+
lockTtlMs: z.number().int().positive().max(MAX_HOOK_LOCK_TTL_MS).optional(),
|
|
25
|
+
/** Hook responses carry the participant's pending messages and edit notices. */
|
|
26
|
+
ambientDelivery: z.boolean().default(true),
|
|
27
|
+
/** Nudge a self-review after this many native edits since the last one; 0 turns the edit cadence off. */
|
|
28
|
+
selfReviewEveryEdits: z.number().int().min(0).default(10),
|
|
29
|
+
/** At Stop, nudge a self-review when edits happened since the last one. */
|
|
30
|
+
selfReviewAtStop: z.boolean().default(true),
|
|
31
|
+
/** `tools/prompt` descriptor whose content is the self-review prompt. */
|
|
32
|
+
selfReviewPromptId: z.string().min(1).default(DEFAULT_SELF_REVIEW_PROMPT_ID),
|
|
33
|
+
/**
|
|
34
|
+
* Tier enforcement on the harness's own tool calls: when `enabled`, PreToolUse and PostToolUse run the
|
|
35
|
+
* `tools/tool` tier subscribers against the Vibes tool a host tool name resolves to, under `tier` and
|
|
36
|
+
* `ceiling` (absent: the agent default ceiling). Off by default.
|
|
37
|
+
*/
|
|
38
|
+
toolTiers: z.object({
|
|
39
|
+
enabled: z.boolean().default(false),
|
|
40
|
+
tier: z.enum(['minimal', 'default', 'recommended', 'full']).default('default'),
|
|
41
|
+
ceiling: z.enum(['0', '1', '2a', '2b', '3']).optional()
|
|
42
|
+
}).prefault({})
|
|
43
|
+
});
|
|
44
|
+
/** The `external` manifest slice this module reads. */
|
|
45
|
+
const ExternalCollaborationSliceSchema = z.object({ collaboration: z.unknown().optional() });
|
|
46
|
+
/**
|
|
47
|
+
* The collaboration settings on `runtime`: the `external` manifest's
|
|
48
|
+
* `collaboration` value parsed with its defaults, or the defaults alone when
|
|
49
|
+
* the runtime composes no `external` manifest.
|
|
50
|
+
*/
|
|
51
|
+
export async function readCollaborationSettings(runtime) {
|
|
52
|
+
if (!ConfigManifest.isRegistered(runtime, 'external'))
|
|
53
|
+
return CollaborationSettingsSchema.parse({});
|
|
54
|
+
const loaded = ExternalCollaborationSliceSchema.parse(await ConfigManifest.forRuntime(runtime, 'external').load());
|
|
55
|
+
return CollaborationSettingsSchema.parse(loaded.collaboration ?? {});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=collaboration-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7G,CAAC;IACF,OAAO,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The edit notice: who else recently changed the file this agent just changed.
|
|
3
|
+
*
|
|
4
|
+
* One reader for every surface that delivers it — the `workspace-fs` tool
|
|
5
|
+
* result (file-access-ambient.impl.ts) and the harness hook response
|
|
6
|
+
* (hook-delivery.ts) — so the peers, the filter, the duplicate-work line and
|
|
7
|
+
* the told-once dedupe cannot drift between them.
|
|
8
|
+
*/
|
|
9
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel';
|
|
10
|
+
import { type TouchPeer } from '../schemas/collision.ts';
|
|
11
|
+
import { type AmbientFileAccessClient } from './file-access-shared.ts';
|
|
12
|
+
/** Forget only this runtime's ephemeral collision delivery history. */
|
|
13
|
+
export declare function resetAmbientDedupe(runtime: VibesRuntime): void;
|
|
14
|
+
export declare function dedupeKey(sessionId: string, filePath: string, peerSessionId: string): string;
|
|
15
|
+
/** What an edit of one path has to say, and how to record that it was said. */
|
|
16
|
+
export interface CollisionNotice {
|
|
17
|
+
/** The peer line, with the duplicate-work line under it when there is one. */
|
|
18
|
+
readonly notice?: string;
|
|
19
|
+
/** Record the peers in `notice` as told; call only once the notice was delivered. */
|
|
20
|
+
markTold(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The notice for this session's change of `filePath` (canonical): the fresh
|
|
24
|
+
* peers' line and the duplicate-work line. Empty when there is nothing new
|
|
25
|
+
* to say, which keeps a solo agent silent.
|
|
26
|
+
*/
|
|
27
|
+
export declare function collisionNotice(runtime: VibesRuntime, client: AmbientFileAccessClient, input: {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
filePath: string;
|
|
30
|
+
workspaceRoot?: string;
|
|
31
|
+
}): Promise<CollisionNotice>;
|
|
32
|
+
/** Recent changers of a path, filtered for collisions, plus the unfiltered set. */
|
|
33
|
+
export declare function collectPeers(runtime: VibesRuntime, client: AmbientFileAccessClient, input: {
|
|
34
|
+
sessionId: string;
|
|
35
|
+
filePath: string;
|
|
36
|
+
workspaceRoot?: string;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
peers: TouchPeer[];
|
|
39
|
+
candidates: TouchPeer[];
|
|
40
|
+
}>;
|
|
41
|
+
//# sourceMappingURL=collision-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision-notice.d.ts","sourceRoot":"","sources":["../../src/ambient/collision-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAKN,KAAK,SAAS,EACd,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAG3F,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAE9D;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,QAAQ,IAAI,IAAI,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GACpE,OAAO,CAAC,eAAe,CAAC,CA2B1B;AAED,mFAAmF;AACnF,wBAAsB,YAAY,CACjC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GACpE,OAAO,CAAC;IAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAAC,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAoD1D"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The edit notice: who else recently changed the file this agent just changed.
|
|
3
|
+
*
|
|
4
|
+
* One reader for every surface that delivers it — the `workspace-fs` tool
|
|
5
|
+
* result (file-access-ambient.impl.ts) and the harness hook response
|
|
6
|
+
* (hook-delivery.ts) — so the peers, the filter, the duplicate-work line and
|
|
7
|
+
* the told-once dedupe cannot drift between them.
|
|
8
|
+
*/
|
|
9
|
+
import { tryGetVibesClient } from '@vibesdotdev/kernel/client';
|
|
10
|
+
import { activeExternalClient } from "./pending-notices.js";
|
|
11
|
+
import { CollisionFilterSchema, DEFAULT_PEER_CAP, DEFAULT_RECENCY_WINDOW_MS, NoticeFormatterSchema } from "../schemas/collision.js";
|
|
12
|
+
import { defaultCollisionFilter } from "./default-collision-filter.impl.js";
|
|
13
|
+
import { defaultNoticeFormatter } from "./default-notice-formatter.impl.js";
|
|
14
|
+
import { findSubsystemOverlaps, formatSubsystemOverlaps } from "./subsystem-overlap.impl.js";
|
|
15
|
+
import { resolveTouchProjection } from "./cloud-touch-projection.impl.js";
|
|
16
|
+
import { resolveAmbientImpl } from "./file-access-shared.js";
|
|
17
|
+
import { attempt } from "./attempt.js";
|
|
18
|
+
/** Forget only this runtime's ephemeral collision delivery history. */
|
|
19
|
+
export function resetAmbientDedupe(runtime) {
|
|
20
|
+
tryGetVibesClient('external', runtime)?.collisionDedupe.clear();
|
|
21
|
+
}
|
|
22
|
+
export function dedupeKey(sessionId, filePath, peerSessionId) {
|
|
23
|
+
return `${sessionId}\u0000${filePath}\u0000${peerSessionId}`;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The notice for this session's change of `filePath` (canonical): the fresh
|
|
27
|
+
* peers' line and the duplicate-work line. Empty when there is nothing new
|
|
28
|
+
* to say, which keeps a solo agent silent.
|
|
29
|
+
*/
|
|
30
|
+
export async function collisionNotice(runtime, client, input) {
|
|
31
|
+
const { peers, candidates } = await collectPeers(runtime, client, input);
|
|
32
|
+
// Duplicate-work signal, computed from the peers the collision filter drops.
|
|
33
|
+
const overlapContext = { sessionId: input.sessionId };
|
|
34
|
+
if (input.workspaceRoot)
|
|
35
|
+
overlapContext.workspaceRoot = input.workspaceRoot;
|
|
36
|
+
const overlapLine = formatSubsystemOverlaps(findSubsystemOverlaps(candidates, [input.filePath], overlapContext));
|
|
37
|
+
const silent = overlapLine ? { notice: overlapLine, markTold() { } } : { markTold() { } };
|
|
38
|
+
const told = activeExternalClient(runtime).collisionDedupe;
|
|
39
|
+
const fresh = peers.filter((peer) => !told.has(dedupeKey(input.sessionId, input.filePath, peer.sessionId)));
|
|
40
|
+
if (fresh.length === 0)
|
|
41
|
+
return silent;
|
|
42
|
+
const formatter = await resolveAmbientImpl(runtime, 'external/notice-formatter', NoticeFormatterSchema, defaultNoticeFormatter);
|
|
43
|
+
const lineOutcome = await attempt(runtime, async () => formatter.format(fresh, { filePath: input.filePath, cap: DEFAULT_PEER_CAP, now: new Date() }));
|
|
44
|
+
const line = lineOutcome.ok ? lineOutcome.value : undefined;
|
|
45
|
+
// A formatter returning null means "say nothing" — honored, not overridden.
|
|
46
|
+
if (!line)
|
|
47
|
+
return silent;
|
|
48
|
+
return {
|
|
49
|
+
notice: overlapLine ? `${line}\n${overlapLine}` : line,
|
|
50
|
+
markTold() {
|
|
51
|
+
for (const peer of fresh)
|
|
52
|
+
told.add(dedupeKey(input.sessionId, input.filePath, peer.sessionId));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Recent changers of a path, filtered for collisions, plus the unfiltered set. */
|
|
57
|
+
export async function collectPeers(runtime, client, input) {
|
|
58
|
+
const now = new Date();
|
|
59
|
+
const since = new Date(now.getTime() - DEFAULT_RECENCY_WINDOW_MS);
|
|
60
|
+
// Local and remote are read CONCURRENTLY. The remote leg is time-boxed
|
|
61
|
+
// inside the projection, so a slow or offline network costs the local
|
|
62
|
+
// answer nothing — the notice simply degrades to same-machine peers.
|
|
63
|
+
const [localOutcome, remoteOutcome] = await Promise.all([
|
|
64
|
+
attempt(runtime, () => client.whoElseTouched({
|
|
65
|
+
filePath: input.filePath,
|
|
66
|
+
workspaceRoot: input.workspaceRoot,
|
|
67
|
+
excludeSessionId: input.sessionId,
|
|
68
|
+
since,
|
|
69
|
+
limit: DEFAULT_PEER_CAP + 5
|
|
70
|
+
})),
|
|
71
|
+
attempt(runtime, async () => {
|
|
72
|
+
const projection = await resolveTouchProjection(runtime);
|
|
73
|
+
return projection.peersForPath({
|
|
74
|
+
filePath: input.filePath,
|
|
75
|
+
workspaceRoot: input.workspaceRoot,
|
|
76
|
+
excludeSessionId: input.sessionId,
|
|
77
|
+
since,
|
|
78
|
+
limit: DEFAULT_PEER_CAP + 5
|
|
79
|
+
});
|
|
80
|
+
})
|
|
81
|
+
]);
|
|
82
|
+
// Merge, LOCAL WINS per session: the same session can appear in both legs
|
|
83
|
+
// (it projected what it also wrote locally), and the local row is the
|
|
84
|
+
// authoritative, freshest copy.
|
|
85
|
+
const local = localOutcome.ok ? localOutcome.value : [];
|
|
86
|
+
const remote = remoteOutcome.ok ? remoteOutcome.value : [];
|
|
87
|
+
const bySession = new Map();
|
|
88
|
+
for (const peer of remote)
|
|
89
|
+
bySession.set(peer.sessionId, peer);
|
|
90
|
+
for (const peer of local)
|
|
91
|
+
bySession.set(peer.sessionId, peer);
|
|
92
|
+
const candidates = Array.from(bySession.values());
|
|
93
|
+
if (candidates.length === 0)
|
|
94
|
+
return { peers: [], candidates: [] };
|
|
95
|
+
const filter = await resolveAmbientImpl(runtime, 'external/collision-filter', CollisionFilterSchema, defaultCollisionFilter);
|
|
96
|
+
const filterOutcome = await attempt(runtime, async () => filter.filter(candidates, { sessionId: input.sessionId, workspaceRoot: input.workspaceRoot, since, now }));
|
|
97
|
+
const peers = filterOutcome.ok ? filterOutcome.value : [];
|
|
98
|
+
// The unfiltered set comes back too. `defaultCollisionFilter` deliberately
|
|
99
|
+
// drops different-worktree peers — right for "are we clobbering each other",
|
|
100
|
+
// wrong for "are we building this twice" (#293). That dropped set is exactly
|
|
101
|
+
// the duplicate-work signal, so it must survive the call.
|
|
102
|
+
return { peers, candidates };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=collision-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision-notice.js","sourceRoot":"","sources":["../../src/ambient/collision-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EAErB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAgC,MAAM,6BAA6B,CAAC;AAC3H,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAgC,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,uEAAuE;AACvE,MAAM,UAAU,kBAAkB,CAAC,OAAqB;IACvD,iBAAiB,CAAiB,UAAU,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;AACjF,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,CAAC;IAElE,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,CAAC;IAC7H,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CACvD,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CACzG,CAAC;IACF,MAAM,KAAK,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAE1D,2EAA2E;IAC3E,6EAA6E;IAC7E,6EAA6E;IAC7E,0DAA0D;IAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default `external/collision-filter`.
|
|
3
|
+
*
|
|
4
|
+
* Decides which peer touches are worth a line in the agent's context. Swap this
|
|
5
|
+
* descriptor to widen (directory-level), narrow (same-symbol), or apply a house
|
|
6
|
+
* policy — without forking the touch stream.
|
|
7
|
+
*
|
|
8
|
+
* The read (`ExternalClient.whoElseTouched`) has already applied the structural
|
|
9
|
+
* rules: other sessions only, same workspace, inside the window, one entry per
|
|
10
|
+
* peer. This filter is the LAST word before a notice is rendered, and its job
|
|
11
|
+
* is to be conservative.
|
|
12
|
+
*
|
|
13
|
+
* A filter may only REMOVE or REORDER. Fabricating a peer here would make the
|
|
14
|
+
* notice lie, and there is no enforcement anywhere in this design to catch it.
|
|
15
|
+
*/
|
|
16
|
+
import type { CollisionFilterImplementation } from '../schemas/collision.ts';
|
|
17
|
+
export declare const defaultCollisionFilter: CollisionFilterImplementation;
|
|
18
|
+
export default defaultCollisionFilter;
|
|
19
|
+
//# sourceMappingURL=default-collision-filter.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-collision-filter.impl.d.ts","sourceRoot":"","sources":["../../src/ambient/default-collision-filter.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAEX,6BAA6B,EAE7B,MAAM,yBAAyB,CAAC;AAWjC,eAAO,MAAM,sBAAsB,EAAE,6BA8BpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|