Feature: SEC1 - eval/exec removal security
  As a security-conscious developer
  I want to verify that eval() and exec() are fully removed from config parsing
  So that code injection attacks are impossible

  Scenario: Config with code injection attempt is rejected
    Given a SimpleToolAgent configured with a code injection payload
    When I attempt to process content through the injected agent
    Then the agent should reject the code block with a routing error
    And the error message should mention code blocks are not supported

  Scenario: Malicious transform expression does not execute
    Given the CleverAgents reactive system is available
    When I configure a transform with a malicious eval expression
    Then the transform should be rejected with a routing error
    And the error message should mention unknown transform

  Scenario: Valid config still works after eval removal
    Given a SimpleToolAgent configured with a named operation "uppercase"
    When I process "hello" through the named operation agent
    Then the named operation result should be "HELLO"

  Scenario: Named transform from registry works after eval removal
    Given the CleverAgents reactive system is available
    When I configure a transform with a registered named function "uppercase"
    Then the named transform should produce the uppercased result

  Scenario: Code block with import attempt is rejected
    Given a SimpleToolAgent configured with an import injection payload
    When I attempt to process content through the injected agent
    Then the agent should reject the code block with a routing error

  Scenario: Eval expression mimicking registry name is still rejected
    Given the CleverAgents reactive system is available
    When I configure a transform with expression "lambda x: __import__('os').system('rm -rf /')"
    Then the transform should be rejected with a routing error

  Scenario: Custom registered operation works
    Given a SimpleToolAgent with a custom registered operation "reverse"
    When I process "abcde" through the custom operation agent
    Then the custom operation result should be "edcba"

  Scenario: Custom registered transform works
    Given the CleverAgents reactive system is available
    And a custom transform "double" is registered
    When I configure a transform with a registered named function "double"
    Then the custom transform should produce the doubled result
