Proactive layer
While the agent works the framework watches and steps in: blocks dangerous commands, reminds about missing tests, notices a stuck model. Everything that happens becomes an event; rules subscribe to events and decide.
| Part | What | State |
|---|---|---|
| Event foundation | One unified stream anyone can subscribe to. Proactive is its first consumer | Running: bus on, both source classes emit, tool.before has the synchronous query point, Web UI is an ordinary subscriber |
| Proactive rules | Policies subscribe and step in. Decoupled from the foundation | Code in openprogram/runtime/proactive/, not installed at worker start |
Event foundation
- Event reference: every event type with payload, timing and source; the API and its three usages (observe, intercept, ask). Check it first when looking up an event.
- Event layer: the Event model, the two source classes, where the bus sits. Diagram.
- Framework evolution: why routing through the Web UI leaves gaps, what the bus gives each role, what stays untouched. Diagram.
Proactive rules
- Overview: one
rm -rfblocked end to end, with rules, interventions and state explained in place. - Events and state: state folded from events, which lets rules remember.
| Page | Covers |
|---|---|
| Execution model | Writing a Policy; blocking and observing kinds |
| MVP policies | Three rules to copy |
| Invariants | What the framework must hold, chiefly no self-triggered loops |
Short answers
- New framework or patch?
- A standalone layer reusing the event bus, tool approval and background tasks.
- Rules are written in?
- Plain Python classes. No config file or DSL.
- How heavy?
- Events, state, rules, stepping in. Tamper resistance, offline replay verification and adversarial safety are in
_research_archive/. - Where is the log?
- Always on.
~/.openprogram/projects/<project-id>/chats/<sid>/events.jsonl, or~/.openprogram/logs/events.jsonloutside a session.
Last updated · 2026-11-25