Skip to content

refactor: restrict Agent field visibility with accessor methods #1996

@bug-ops

Description

@bug-ops

Epic: #1977

All 21 Agent state fields are pub(super), meaning any of 30+ files in agent/ can access any field. Add accessor methods and change fields to pub(self) where possible.

Start with the most-accessed fields:

  • memory_state -> memory_state(), memory_state_mut()
  • skill_state -> skill_state(), skill_state_mut()
  • context_manager -> context_manager(), context_manager_mut()

Acceptance Criteria:

  • At least 5 fields accessed via methods only
  • No behavioral changes
  • All tests pass

Complexity: Large | Effort: 6h
Ref: ABS-04

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture improvementscorezeph-core crate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions