Skip to content

refactor: Move channels to separate channels.yaml config - #444

Merged
edenreich merged 1 commit into
mainfrom
refactor/move-channels-to-separate-config
Apr 26, 2026
Merged

edenreich merged 1 commit into
mainfrom
refactor/move-channels-to-separate-config

Conversation

@edenreich

@edenreich edenreich commented Apr 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Splits the channels: block (Telegram, WhatsApp, max workers, image retention, approval flag) out of .infer/config.yaml into a dedicated .infer/channels.yaml, mirroring the mcp.yaml / keybindings.yaml / prompts.yaml pattern.
  • Adds .infer/channels.yaml to tools.sandbox.protected_paths defaults so the agent cannot read or rewrite bot tokens.
  • infer init seeds the new file from in-code defaults and, when a legacy channels: block is present in config.yaml and no channels.yaml exists yet, migrates the values across and prints a one-line follow-up note pointing the user at the now-redundant block.
  • Preserves INFER_CHANNELS_* env-var support via an explicit applyChannelsEnvOverrides (mirroring applyKeybindingEnvOverrides / applyPromptsEnvOverrides) so the docker-compose example in examples/telegram-channel keeps working unchanged.

Closes #441

Splits the `channels:` block out of `.infer/config.yaml` into its own
`.infer/channels.yaml`, mirroring the existing `mcp.yaml` /
`keybindings.yaml` / `prompts.yaml` pattern. Bot tokens no longer share a
file the agent is allowed to rewrite — `channels.yaml` is now in
`tools.sandbox.protected_paths` by default.

`infer init` seeds the new file from in-code defaults; if a legacy
`channels:` block exists in `config.yaml` and `channels.yaml` does not,
init migrates the values across and prints a follow-up note.
INFER_CHANNELS_* env vars are preserved via an explicit
`applyChannelsEnvOverrides` so the docker-compose example keeps working.

Closes #441
@edenreich
edenreich merged commit aa43e0e into main Apr 26, 2026
@edenreich
edenreich deleted the refactor/move-channels-to-separate-config branch April 26, 2026 22:48
edenreich added a commit that referenced this pull request Apr 27, 2026
## Summary

- Closes #440. Extracts the ~40-line `computer_use:` block out of
`config.yaml` into its own `<configDir>/computer_use.yaml`, mirroring
the recent `channels.yaml` pattern (#444). Most users have computer_use
disabled, so this trims the main config significantly.
- Adds `config/computer_use.go` (`DefaultComputerUseConfig`,
`LoadComputerUse`, `SaveComputerUse`), wires the loader into
`loadConfigFromViper` with a project→userspace fallback, and replicates
the previous viper auto-binding via a fully-explicit
`applyComputerUseEnvOverrides` so every `INFER_COMPUTER_USE_*` env var
still works.
- `infer init` seeds the new file from in-code defaults and migrates a
legacy `computer_use:` block from `config.yaml` if one is found
(one-shot, idempotent on re-run). The file is added to
`tools.sandbox.protected_paths` defaults.
inference-gateway-releaser Bot pushed a commit that referenced this pull request Apr 27, 2026
## [0.104.1](v0.104.0...v0.104.1) (2026-04-27)

### 🐛 Bug Fixes

* **ui:** Restore typing while agent is busy ([#455](#455)) ([92840d6](92840d6)), closes [#410](#410)
* **services:** Trigger auto-compact from gateway-reported tokens ([#454](#454)) ([1fc19dd](1fc19dd))
* **config:** Update model context windows and pricing for current model lineup ([#452](#452)) ([655f9f8](655f9f8))

### ♻️ Code Refactoring

* **config:** Centralize config loading and remove service indirection ([#443](#443)) ([babf173](babf173))
* **config:** Centralize sub-config definitions and consolidate prompts ([#448](#448)) ([9979ac7](9979ac7))
* Extract keybindings configuration to separate file ([#438](#438)) ([6d04195](6d04195))
* **config:** Generate viper defaults via reflection over DefaultConfig() ([#436](#436)) ([85c6e0a](85c6e0a))
* **config:** Make tool prompts configurable via prompts.yaml ([#450](#450)) ([9fc1bb5](9fc1bb5)), closes [#446](#446)
* Move channels to separate channels.yaml config ([#444](#444)) ([aa43e0e](aa43e0e)), closes [#441](#441)
* Move computer_use to a separate config ([#447](#447)) ([a762c64](a762c64)), closes [#444](#444)
* Move prompts to separate prompts.yaml config ([#442](#442)) ([45e4fb6](45e4fb6))
* **config:** Unify sub-configs behind CollectionConfig + utils.{Load,Save}YAML ([#445](#445)) ([aab481c](aab481c))

### 📚 Documentation

* Add directory-structure reference ([#451](#451)) ([95d26f8](95d26f8))

### 👷 CI/CD

* Reduce runs of nix ([acac364](acac364))

### 🧹 Maintenance

* **deps:** Bump modernc.org/sqlite from 1.49.1 to 1.50.0 ([#449](#449)) ([06a535d](06a535d))
* **nix:** Update package to v0.104.0 ([#432](#432)) ([5564697](5564697))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.104.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Move channels to a separate config

1 participant