# dsh-bash-native bundle patch: one additive row, the entry that registers this bundle's agent presets.
#
# The preset bodies used to be here and cannot be any more. A preset row's modules resolve against the
# base of the Loader entry that declares the row, so rows declared by this file resolve from this
# package's directory inside the profile — which sees the profile's dependency tree and nothing else —
# while the registry mounts a registered definition with its own base inside the harness installation.
# Only that second base sees a harness package the profile does not carry, which is what lets one
# published composition follow the harness line it is installed on: a row whose package this host does
# not ship is left out instead of failing the mount audit, which would mark the whole preset broken.
# `lib/presets.js` reads both definitions from the shipped preset files of the host's own harness line
# (`lib/preset-source.js` reads `presets/standard.patch.yml` and `presets/minimal.patch.yml` out of the
# `@deepseek-ai/dsh-web-app` installation the registry itself lives in) and registers them with only the
# shell surface replaced (`lib/preset-data.js`). Every other row — and every platform branch the shipped
# file carries — therefore arrives from that file instead of a copy taken at release time, and
# `test/test-preset-parity.mjs` is the drift alarm for the shape of the surface this bundle replaces. The
# measurements behind this are docs/research.md sections 58 and 67.
#
# The row still only inserts. It never reconfigures or disables a row another bundle owns, so the host
# plane keeps its own `ctx.shell` and the shipped presets keep their `pwsh` tool; the bash executor is
# this bundle's own, inside the realm group each composition declares.
#
# It activates wherever an agent-preset registry does — the Web surface mounts one — and stays pending
# elsewhere, exactly as the two declaration rows it replaces did. Off Windows it activates and registers
# nothing, with one warning: the shell these presets advertise is the Windows engine this package ships.
#
# The shelved alternative lives in `overlays/single-agent-bash-native.yml`, which a single-agent
# surface (`dsh tui`, `dsh headless`, `dsh acp`) applies explicitly with `--patch`.
#
# The second row is the interactive terminal component, and it ships switched off. Both rows are
# switchable separately in the Plugins page, because the controls address one Loader entry each and skip
# rows marked `group: true` — so a composition that has to be switchable is one entry, never a group.
#
# It is deliberately not part of the presets: a registered preset cannot be amended, so a component that
# could be switched on and off independently has to be a composition of its own. `lib/terminal.js` mounts
# the harness's terminal registry, its bash PTY backend and its six `terminal_*` tools over this bundle's
# own engine, on an isolated `shell` scope so that no composition already providing one is disturbed.
#
# It is off by default because those six tool names are global: the harness's own
# `@deepseek-ai/dsh-experimental-terminal-bundle` registers the same six, and two registrations of one
# name fail a mount. A fresh install must not walk into that, so switching this component on is an
# explicit act — and it is mutually exclusive with that bundle.
- insert:
    - id: bash-native-presets
      name: 'dsh-bash-native/presets'
      config:
        presets:
          - bash-native
          - bash-native-minimal

    - id: bash-native-terminal
      name: 'dsh-bash-native/terminal'
      disabled: true
