|
|
@@ -101,6 +101,15 @@ from .handlers import (
|
|
|
EffectHandler, ProductionHandler, TestHandler, TraceHandler,
|
|
|
get_current_handler, set_current_handler, with_handler,
|
|
|
)
|
|
|
+# Paper III §4.3: Graded Cost Prediction
|
|
|
+from .cost_grade import (
|
|
|
+ CostGrade, estimate_cost, format_cost_estimate,
|
|
|
+ grade_serial, grade_parallel, grade_iterate, grade_guard,
|
|
|
+)
|
|
|
+# Paper II Theorems 36-41: Algebraic Law Rewrite Rules
|
|
|
+from .rewrite import optimize as optimize_agent, RewriteLog, RewriteEntry
|
|
|
+# Paper II: CEK Machine upgrades
|
|
|
+from .cek_machine import AgentCEKMachine, CostVector, CostMonotonicityViolation
|
|
|
# Phase 1: P0 Engineering Improvements
|
|
|
from .cancellation import CancellationToken, CancelledError, NullCancellationToken
|
|
|
from .retry import RetryPolicy, CircuitBreaker, CircuitOpenError, with_retry, with_retry_sync
|
|
|
@@ -197,6 +206,13 @@ __all__ = [
|
|
|
# Paper III §6: 代数效果处理器
|
|
|
"EffectHandler", "ProductionHandler", "TestHandler", "TraceHandler",
|
|
|
"get_current_handler", "set_current_handler", "with_handler",
|
|
|
+ # Paper III §4.3: 分级成本预测
|
|
|
+ "CostGrade", "estimate_cost", "format_cost_estimate",
|
|
|
+ "grade_serial", "grade_parallel", "grade_iterate", "grade_guard",
|
|
|
+ # Paper II: 代数定律重写
|
|
|
+ "optimize_agent", "RewriteLog", "RewriteEntry",
|
|
|
+ # Paper II: CEK 机器
|
|
|
+ "AgentCEKMachine", "CostVector", "CostMonotonicityViolation",
|
|
|
# 辅助设施
|
|
|
"Dataset",
|
|
|
"from_config", "build_agent", "describe_config",
|