Files
kunail0804-ComfyUI-Scene-Co…/config/default_config.json
T
d1bebdb571 feat(compiler): add typed, injectable configuration system (#5) (#49)
Implement the compiler configuration per MASTER_SPEC §23 in
compiler/common/config.py, with a strict configuration schema.

- Frozen dataclasses per section (analyzer, resolver, validator, prompt_builder,
  debug) plus a top-level `schema` version; every default matches §23.2.
- Config.from_json validates against schemas/json/configuration.schema.json and
  raises ConfigError carrying a Fatal SC0014 message on invalid input; every
  section/field is optional and falls back to defaults.
- load_config(path) reads and validates a JSON file.
- Deterministic by construction: additionalProperties:false rejects unknown keys
  (including any random seed); temperature has minimum 0.
- Injected into stages; no global/singleton config state.
- Ships config/default_config.json (the §23.2 example) as the canonical default.

Tests: defaults match §23.2, full/empty/partial load, file load, and
invalid-config rejection (wrong type, unknown field, forbidden seed, negative
temperature) producing SC0014.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 19:11:44 +02:00

31 lines
595 B
JSON

{
"schema": "1.0",
"analyzer": {
"backend": "ollama",
"model": "llama3",
"temperature": 0.0,
"max_retries": 3,
"timeout": 60
},
"resolver": {
"knowledge_base": "knowledge_base/",
"strict_mode": true,
"allow_aliases": true,
"expansion_enabled": true,
"max_expansion_depth": 8
},
"validator": {
"allow_unknown_fields": false
},
"prompt_builder": {
"target": "easy_illustrious",
"separator": ",",
"trim_empty_outputs": true,
"remove_duplicate_tags": true
},
"debug": {
"enabled": false,
"level": "basic"
}
}