Skip to content

[FEATURE]: YAML config parsing for RUST Core with routing rules. #16

Closed

Description

@terylt

Epic: CPEX Rust Core (#12)

Summary

Implement the unified YAML config parser in cpex-core (config.rs). Parses the single config format that combines global policies, defaults, plugin declarations, and per-entity routes into typed Rust structs via serde.

Motivation

Currently, plugins must be registered programmatically. Config-driven registration enables declarative plugin setup from a single YAML file. We will add routing rules to the current plugin configuration, and provide experimental integrations with APL eventually.

Scope

  • CpexConfig top-level struct: global, plugins, routes
  • GlobalConfig: policies (named policy groups with all reserved), defaults (per entity type), delegation, identity, session
  • PluginDeclConfig: per-plugin declaration (name, kind, hooks, mode, priority, capabilities, conditions, config)
  • RouteEntry: entity matcher (tool/resource/prompt/llm), meta (tags, scope, properties), policy, post_policy, args, result, taint
  • Validation at load time: duplicate plugin names, unknown hook names, invalid mode/capability values
  • Integration with PluginManager — config drives register_handler calls

Acceptance Criteria

  • Parse the example YAML from the unified config proposal without errors
  • Type validation catches malformed configs at startup
  • PluginManager can be initialized from a config file path
  • Route matching: exact name > name list > glob > meta tag match > when expression > defaults

References

Activity

  1. added this to the 0.2.0 milestone on Apr 17, 2026
  2. added
    enhancement
    on Apr 17, 2026
  3. moved this from Backlog to In progress in CPEXon Apr 21, 2026
  4. moved this from In progress to Done in CPEXon May 4, 2026
  5. closed this as completedby moving to Done in CPEXon May 4, 2026
  6. added theissue type on Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions