Codumentor logo Codumentor

Configuration Assistant Plugin

The Configuration Assistant gives administrators a chat that edits this Codumentor instance's own configuration in plain language — "add this repo", "switch the main model to the fast slot", "enable the redmine plugin and tell me what secret it needs", "why are webhooks failing?" — instead of hand-editing YAML against the configuration reference.

It runs against the running instance (this server). A Configuration Assistant launcher on the Admin page opens a normal chat that only admins can create. Ordinary conversations are unchanged.

The safety flow

One typical turn:

  1. Ground — read the current config, the live schema (keys, types, defaults, and what a change costs to apply), and the matching docs section.
  2. Propose — build a candidate change, validate it against the real loader, and show a YAML diff plus whether each changed section applies live, rebuilds a subsystem, or needs a restart. An invalid change is reported with the error and never offered for apply.
  3. Approve — applying or rolling back asks for your confirmation on the diff before anything is written.
  4. Apply — a timestamped backup is written next to the config file, the leaf file is updated, then hot-reload runs. The result (applied / rebuilt / restart required / errors) is shown in the chat.
  5. Rollback — restore the most recent backup and reload.

What the assistant can do

These are the tools you will see in the chat. Read tools never ask for approval; apply and rollback do.

ToolApprovalPurpose
config_schemanone (read)Keys, types, defaults, and whether a section applies live, rebuilds, or needs a restart. Also a plugin's args schema — including a plugin that is documented but not installed yet.
config_readnone (read)The running config (env-substituted; secret values redacted).
plugin_confignone (read)Installed plugins, documented plugins not yet installed, and how to add one. Any section of a plugin's catalog page (topic=), or all of it.
config_docsnone (read)Sections of the configuration reference on demand. Per-plugin docs are in the catalog, via plugin_config.
read_logsnone (read)Tail / search the configured log file to diagnose problems.
config_proposenone (read)Validate a patch and return the exact YAML diff. Writes nothing.
config_applyyou approve firstRe-validate, back up, write the leaf config, then hot-reload.
config_rollbackyou approve firstRestore the most recent timestamped backup and reload.
read_contentnone (read)Page through a result that was too large to return in one piece.

The catalog it can see is the one this build contains. An executable is built
as one edition, and a plugin outside it is not "not installed yet" but absent, so
the assistant does not list it, does not offer its configuration, and says so
plainly if you ask for it by name — rather than proposing a config the plugin
loader would refuse. codumentor build-info is the same answer from the CLI.

Configuration

plugins:
  - module: codumentor.plugins.configuration_assistant
    class: ConfigurationAssistantPlugin
    args:
      enabled: true
ParameterTypeDefaultDescription
enabledbooltrueMaster on/off. When false, the Admin-page launcher is hidden.

No other settings. The assistant can target two overlay files (see overlay_targets on config_schema with no section):

Omit target to edit the default leaf. A discovered project YAML still cannot set model endpoints or auth; those stay in the user overlay. The assistant does not edit deeper files in an extends: chain.

Only users with the admin:* permission can open a configuration-assistant chat.

What a change costs

Shown up front before you approve:

Notes & limitations