Commit d2a009b
Evaluator: real agent runtime + Session type checking (L9)
Evaluator (major upgrade from stubs to working runtime):
- Loop: real iteration with break/continue/return signals, 10K safety limit
- Spawn: creates AgentInstance with handlers, state, inbox from registered decls
- Send/SendFinal: delivers messages to target agent's inbox via Handle
- Receive: pops from current agent's inbox (non-blocking)
- Exchange: send + synchronous handler execution + reply collection
- Method calls: String (length/to_upper/to_lower), List (length/get/push),
Record (keys), Handle (id)
- Agent handler execution: run_agent_handler() dispatches to matching handler
- register_agents(program) pre-registers AgentDecls for spawn lookup
- Break/Continue AST variants added to ControlStmt
Type checker — Session types (Kategoria L9):
- ProtocolTypeInfo: registered during Pass 1 with extracted roles
- project_protocol(): global protocol → local view per role
(Message steps become Send/Receive based on sender/receiver matching)
- check_agent_protocol_compliance(): agents declaring `implements Protocol.Role`
verified to have handlers for all projected Receive steps
- SessionProtocolViolation error kind for missing handlers
- LocalStep enum: Send, Receive, Branch, Loop, Rec
Tests: 160 total (was 141) — 15 new eval tests + 4 new session type tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7193b99 commit d2a009b
6 files changed
Lines changed: 1567 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
0 commit comments