# rolebox as a dsh profile bundle layer — configured example.
#
# This file mirrors the shipped bundle layer (dsh/cordis.patch.yml) but with a
# populated `config` block so you can see every Config option in action.
# Copy the `insert` list (or the id-targeted override) into your profile's
# cordis.patch.yml at ~/.dsh/profiles/<name>/cordis.patch.yml — the profile
# layer is applied AFTER every bundle layer, so the id-targeted form below
# overrides the bundle's default row.
#
# Contract reference: docs/dsh-plugin-contract.md §5.3 (entry shapes) and
# §5.4 (layer order). Config options are all optional; see README
# "Running as a dsh plugin" for the table.
#
# Option 1 — insert a fully-configured rolebox row (bundle-install equivalent):
- insert:
    - id: rolebox
      name: rolebox/dsh          # subpath export → dist/dsh-plugin.js (cordis plugin)
      config:
        # Override the rolebox directory (default: {dsh home}/rolebox).
        roleboxDir: /absolute/path/to/roles
        # Override the global skills directory (default: {dsh home}/skills).
        skillsDir: /absolute/path/to/skills
        # Promote this role id (directory name) to primary mode.
        defaultRole: emperor
        # Tool allow-list: exact tool names or namespace prefixes.
        # "*" (or an absent/empty option) registers every assembled tool.
        enabledNamespaces:
          - hashline
          - web
          - graph
        # No web config keys exist: the role-switch UI surfaces as a
        # dsh.client slot plugin in the web profile, and the `/rolebox` route
        # is served by dsh's own host webserver — nothing to configure here.
      disabled: false

# NOTE (client scan resolution): the row `name` (`rolebox/dsh`) is the package
# spec dsh-client-modules resolves via require.resolve('<name>/package.json')
# when scanning for dsh.client packages. package.json must keep the
# `"./dsh/package.json"` export (→ ./package.json) or the web client is
# silently skipped from the boot graph; the client bundle envelope id must
# equal this name too (scripts/build-dsh-web-client.ts).
#
# Option 2 — override just the bundle's default row (same id, no insert):
# - id: rolebox
#   config:
#     defaultRole: emperor
#     enabledNamespaces: ["graph", "loop"]
#
# NOTE (replace, not merge): an id-targeted override replaces the row's whole
# `config` object. The bundle's row ships no web config — the role-switch UI
# surfaces as a dsh.client slot plugin in the web profile and the `/rolebox`
# route is served by dsh's own webserver — so nothing hidden is lost by a
# config override; just re-declare the options you want to keep.
