# 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
      # Profile-relative path to the cordis host half. The row must be a
      # package root or a path-like specifier (never the `rolebox/dsh`
      # subpath) so dsh-client-modules scans it and derives the browser
      # module id `rolebox` from the package manifest.
      name: ./node_modules/rolebox/dist/dsh-plugin.js
      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): dsh-client-modules only scans loader rows
# whose `name` is a package root or a path-like specifier, then derives the
# browser module id from the nearest owning package.json. Here that manifest
# is `node_modules/rolebox/package.json` (name "rolebox"), so the bundle
# envelope id is `rolebox` (scripts/build-dsh-web-client.ts). The shipped
# bundle layer uses `../dist/dsh-plugin.js` because its patch file sits at
# `<pkg>/dsh/cordis.patch.yml`; a profile patch resolves against the profile
# directory instead.
#
# 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.
