Skip to content

feat(config): apply top-level runtime settings - #12

Merged
Blankeos merged 3 commits into
Blankeos:mainfrom
yan-ad:feat/config-top-level-implementations
Aug 6, 2026
Merged

feat(config): apply top-level runtime settings#12
Blankeos merged 3 commits into
Blankeos:mainfrom
yan-ad:feat/config-top-level-implementations

Conversation

@yan-ad

@yan-ad yan-ad commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Load configured instruction files into system prompts.
  • Apply global tool permissions, watcher settings, and enabled/disabled provider filters.
  • Parse compaction and formatter settings, and document their current compatibility status.

Validation

  • cargo fmt --all
  • cargo test config::configuration::tests::parses_and_applies_top_level_runtime_configuration

yan-ad and others added 2 commits August 3, 2026 14:54
Wire global tool config, custom instructions, and provider filters into
the interactive App path so they match print-mode behavior.
@Blankeos

Blankeos commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Nice work on this. The parsing and print-mode wiring looked solid.

Merge confidence: 4/5

My agent found a bug.. I reproduced the gap with:

  1. Add a tools and instructions config
// ~/.config/crabcode/crabcode.jsonc
{
  "tools": { "bash": false },
  "instructions": ["~/dotfiles/CUSTOM.md"]
}
  1. CUSTOM.md saying “Always begin every response with CUSTOM-INSTRUCTION.”
  2. crabcode -p "hi" honored it;
  3. a normal interactive TUI session did not (bash still available, no
    custom instruction).

The new commit fixes that.

…very

- add `ConfigRuntime`/`ConfigRuntimeOptions` to build tool permissions, discovery, and custom instructions from merged config in one place - switch interactive app and print mode to use shared runtime construction and remove duplicated setup logic - move print-mode interactive tool denies (`question`, `update_plan`) into shared runtime path - expose `Discovery::provider_is_enabled` for tests and extend runtime tests for shared wiring behavior
@Blankeos

Blankeos commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Merge confidence: 4.8/5

New change: Unify config → runtime assembly in ConfigRuntime so both entrypoints share one place for permissions, discovery, and instructions — with unit tests covering tool disable, instructions, provider filters, and print-mode interactive-tool denies.

LGTM from my side

@Blankeos
Blankeos merged commit 0eed17b into Blankeos:main Aug 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants