mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
An agent.open.before result can carry `wrap: [executable, ...args]`. A supporting provider starts that session's harness as `[...wrap, command, ...args]`, one direct argv exec with the final hook env. This lets one sandbox plugin confine every provider that supports wrapping, instead of one wrapper provider per real provider. Support is a static provider property, published as optional `launchWrap` on the provider snapshot entry so an agent.create.before hook can read it with paseo.providers.snapshot(). Codex and providers that extend it declare it in the provider contract; plugin providers declare ProviderRegistration.launchWrap, which runAcpProvider sets for a command. The declaration travels in the registration metadata, so a provider reports it before its first connection. The open fails closed: - buildLaunchContext rejects a wrapped open with LaunchWrapUnsupportedError (code launch_wrap_unsupported) before anything starts when the provider does not declare support, when a plugin connection lacks session.launch_wrap, or for a Windows command-script wrapper; - a later hook may omit or repeat the wrap, a different one fails the open; - the wrap executable must be absolute; - a missing launcher fails the spawn and is never retried bare; - a host without this change rejects the unknown `wrap` key. The wrap is launch-only: history opens keep it, plugin session reopens reuse it, and it is never stored on the agent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>