Metadata-Version: 2.4
Name: superred-optimizer-goal-passthrough
Version: 0.1.0
Summary: Goal-passthrough (unattacked direct-prompt) baseline optimizer for superred
Project-URL: Homepage, https://superred.simonsure.com
Project-URL: Documentation, https://superred.simonsure.com
Project-URL: Repository, https://github.com/RoldSI/superred-modules
Project-URL: Issues, https://github.com/RoldSI/superred-modules/issues
Author-email: Simon Sure <info@simonsure.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai-safety,baseline,llm,optimizer,red-teaming,security,superred
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Requires-Python: <3.14,>=3.11
Requires-Dist: superred>=0.1.0
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Description-Content-Type: text/markdown

# goal_passthrough

The **unattacked direct-prompt baseline** optimizer for superred.

`GoalPassthroughOptimizer` performs no attack. On each run it injects the
adversarial `Goal.description` verbatim, exactly once, into the first
user-facing controllable, then ends the run. It is the zero-attack
reference point in an attacker sweep: it answers "what does the target do
when simply asked the harmful question, with no jailbreak?"

## Behaviour

| Event | Response |
|---|---|
| `RunStartEvent` | acknowledge; arm the single injection for this run |
| first `ControllablePreCallEvent` (non-`system_prompt`) | `ControllableInjection(value=goal.description)` |
| subsequent `ControllablePreCallEvent` | `ControllableNoInjection` (single-turn) |
| `ControllablePostCallEvent` | `ControllableNoInjection` (never edits responses) |
| `RunEndEvent` | `RunEndResponse(done=True)` (one attempt per task) |

The `system_prompt` controllable is always declined, so a benchmark
`Task` that pre-sets the system prompt via `configure_target` keeps it
intact. The baseline only fills the user-message channel.

## Properties

- **No LLM use.** It never calls the `LLMClient`, so it spends none of the
  per-task budget and is invariant to the attacker-model dimension.
- **Scope-robust.** It locks onto the first non-`system_prompt`
  controllable it sees, so it works against any chatbot-style target
  regardless of how the user-message controllable is named.
- **Zero config.** Constructs with no arguments, like every superred
  optimizer.

## Install

```bash
pip install -e optimizers/goal_passthrough
```

```python
from goal_passthrough_optimizer import GoalPassthroughOptimizer
```

## Credits / upstream

This module is original work of the superred project, released under the MIT
License (see `LICENSE`). It contains no third-party code, no bundled datasets,
and does not reimplement or port any external paper method. Its only
dependency is the `superred` framework itself.
