17 lines
429 B
Python
17 lines
429 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any, Dict
|
|
|
|
|
|
class Sandbox:
|
|
def __init__(self):
|
|
self.state: Dict[str, Any] = {}
|
|
|
|
def reset(self) -> None:
|
|
self.state = {}
|
|
|
|
def run(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
|
|
# Very basic simulation: echo inputs and update internal counters
|
|
self.state.update(inputs or {})
|
|
return {"status": "ok", "state": self.state}
|