# The dsh-artifact bundle patch: one host row that registers everything the
# artifact surface needs on the host plane —
#
#   * the `artifact` Remote service consumed by the browser half,
#   * the model-facing `artifact` tool,
#   * a system-prompt section naming the store, so the model knows where its
#     output lands,
#   * the bundled `writing-artifacts` skill (a runtime skill, so it needs no
#     skill root on disk and travels inside the package).
#
# The browser half — sidebar action + artifact browser overlay — ships via the
# package.json `dsh.client` declaration + exports["./client"].
#
# Only `tools` is injected. The store is harness user data under `$DSH_HOME`
# reached with `node:fs`, not workspace content: the filesystem service has no
# delete and no mkdir, and its sandbox would deny every write to a directory
# outside the session workspace under the default `workspace-write` policy.
- insert:
    - id: artifact
      name: 'dsh-artifact'
      inject: [tools]
      config:
        # Absolute directory owning artifact HTML files. Omit (or set to null)
        # to use `$DSH_HOME/artifacts` — by default `~/.dsh/artifacts`.
        root: null
        # Maximum characters accepted in one artifact write (tool + UI).
        maxArtifactChars: 400000
        # Superseded revisions kept per artifact, oldest dropped first. They
        # live in `.versions/` inside the store. 0 turns history off: writes
        # stop keeping what they replace and the browser shows no history
        # controls at all.
        maxVersionsPerArtifact: 20
        # Register the system-prompt section that tells the model artifacts
        # exist and where they are stored. Set false to keep the tool but drop
        # the nudge; the tool description still carries the same rules.
        promptSection: true
        # Register the bundled `writing-artifacts` skill.
        skill: true
        # Color overrides handed to previewed artifacts, layered on top of the
        # app's own live theme (which is the default). Keys are custom
        # properties; one without a leading `--` is read as an alias token.
        # palette:
        #   state-business-primary: '#e0552b'
        #   --dsw-alias-bg-base: '#faf7f2'
