Skip to content

Conversation

@daveey
Copy link
Contributor

@daveey daveey commented Jan 3, 2026

TL;DR

Added a new data-driven activation handler system that allows configuring object interactions through declarative configuration rather than hardcoded behavior.

What changed?

  • Implemented a new activation handler system that allows objects to define how they respond when agents interact with them
  • Added configuration structures for filters (VibeFilter, ResourceFilter) and mutations (ResourceDelta, ResourceTransfer, Alignment, Freeze, Attack)
  • Integrated activation handlers with the Move action system to trigger when agents move onto objects
  • Updated GridObject to support activation handlers and added helper methods to set and retrieve them
  • Added comprehensive tests for the new activation handler system
  • Updated the cogsguard recipe to use the new activation handlers for align/scramble functionality

How to test?

  1. Run the new test file test_activation_handlers.py to verify all handler types work correctly
  2. Try the updated cogsguard recipe which now uses activation handlers instead of dedicated align/scramble actions
  3. Create custom activation handlers in Python config and verify they trigger when agents interact with objects

Why make this change?

This change makes the environment more flexible by allowing object interactions to be defined through configuration rather than hardcoded C++ behavior. This enables:

  1. Creating new interaction types without modifying C++ code
  2. Composing complex behaviors from simple building blocks
  3. Defining context-sensitive interactions based on agent state (vibe, resources)
  4. Reducing code duplication by centralizing interaction logic in a single system

The activation handler system will eventually replace the legacy vibe-specific action handlers, making the codebase more maintainable and easier to extend.

Copy link
Contributor Author

daveey commented Jan 3, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@daveey daveey changed the title cp feat: add activation handler system for object interactions Jan 3, 2026
@daveey daveey force-pushed the daveey-target-handlers branch from e66f5cd to 42aca39 Compare January 4, 2026 22:33
@daveey daveey force-pushed the daveey-target-handlers branch from 42aca39 to 1144b8a Compare January 4, 2026 22:46
@daveey daveey force-pushed the daveey-target-handlers branch from 1144b8a to 99423ef Compare January 4, 2026 23:05
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