[Bug] nanocoder config list/show/diff doesn't know about autoCommit, formatters, hooks, sandbox and notifications
Description
nanocoder config list, show and diff use a hand-written list of keys (blockSpecs() in source/config/effective-config.ts). It was never updated for autoCommit, formatters, hooks, sandbox and notifications, so those settings can't be shown or compared, even though the loader reads them. config diff is a natural way to check what a cloned repo's config will run, and it hides the keys that run shell commands or create commits.
Environment
- OS: Windows 11 (10.0.26300)
- Node version: 22.22.3
- Nanocoder version: 1.31.0 (main at 6eaff7af)
- Provider / Model: not relevant
Steps to Reproduce
- In a project, create
agents.config.jsonwith{"nanocoder": {"autoCommit": true, "formatters": [{"match": ["**/*.js"], "command": "echo formatted", "name": "fmt"}], "hooks": {"post-tool-use": [{"command": "echo hook"}]}, "sandbox": true, "notifications": {"enabled": true}, "alwaysAllow": ["read_file"]}}. - Run
nanocoder config list. - Run
nanocoder config show nanocoder.alwaysAllow, thennanocoder config show nanocoder.autoCommit(and the same forformatters,hooks,sandbox,notifications). - Run
nanocoder config diff.
Expected Behavior
Every key the loader reads appears in config list and config diff, and config show <key> finds it.
Actual Behavior
Only alwaysAllow (the control) is found:
33:nanocoder.alwaysAllow ["read_file"] project agents.config.json
$ nanocoder config show nanocoder.autoCommit
No configuration key matching "nanocoder.autoCommit".
Run "nanocoder config list" to see every resolved key.
(exit 1; the same for formatters, hooks, sandbox and notifications)
A unit-level check also fails: resolveEffectiveConfig() returns no entry for autoCommit, formatters, hooks, sandbox or notifications.
Suggested Fix
source/config/effective-config.ts(blockSpecs(), lines 351-433): it lists 12 keys.AppConfiginsource/types/config.ts(lines 393-483) also hashooks(425),formatters(429),notifications(445),sandbox(477),autoCommit(480) andlspServers(402). Add a spec entry for each, redacting anything secret-like the same way the other entries do.- Add a test that fails when they drift apart again: for every key under
nanocoderinschemas/agents.config.schema.json(plusnotifications), check thatresolveEffectiveConfig()can show it.
Additional Context
- Related: #1123 (added the command) and #1006 (the original request). Open PRs #1525 (
verification) and #1564 (channels) each add their own row, but not the missing ones above. - I did not test
lspServers. - [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs with the latest version of nanocoder
Interested in taking this up can you assign this to me @addyCooks