- harness/es.py: append-only event store + проекции (образец — кооп-портал) - harness/levels.py: уровни 1с/1м/1ч/1д, контекст ∝ масштабу - harness/scheduler.py: уровневые потоки, идемпотентные тики, absorbed-стабы - harness/isolated_runner.py + _llm_worker.py: LLM-тик в сабпроцессе (глобальный asyncio-рантайм Strands не переживает 2+ create_harness) - cli.py: init/task/tasks/status/events + requeue (написан самим минутным агентом) - 9router: отдельный ключ sk-simbiot, модель auto (glm-5.3 первым)
31 lines
791 B
Python
31 lines
791 B
Python
from __future__ import annotations
|
|
|
|
from typing import NoReturn, TypeVar
|
|
|
|
from attrs import define as _define, frozen as _frozen
|
|
|
|
_T = TypeVar("_T")
|
|
|
|
|
|
def define(cls: type[_T]) -> type[_T]: # pragma: no cover
|
|
cls.__init_subclass__ = _do_not_subclass
|
|
return _define(cls)
|
|
|
|
|
|
def frozen(cls: type[_T]) -> type[_T]:
|
|
cls.__init_subclass__ = _do_not_subclass
|
|
return _frozen(cls)
|
|
|
|
|
|
class UnsupportedSubclassing(Exception):
|
|
def __str__(self):
|
|
return (
|
|
"Subclassing is not part of referencing's public API. "
|
|
"If no other suitable API exists for what you're trying to do, "
|
|
"feel free to file an issue asking for one."
|
|
)
|
|
|
|
|
|
@staticmethod
|
|
def _do_not_subclass() -> NoReturn: # pragma: no cover
|
|
raise UnsupportedSubclassing()
|