gradual-adoption: export state_delta, falsification_critic, sandbox_hooks from __init__
Browse files- purpose_agent/__init__.py +17 -11
purpose_agent/__init__.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
"""
|
| 2 |
purpose_agent β A local-first self-improvement kernel for agents.
|
| 3 |
|
| 4 |
-
v3.0
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
See COMPILED_RESEARCH.md for the full research trace.
|
| 8 |
"""
|
| 9 |
|
| 10 |
__version__ = "3.0.0a1"
|
|
@@ -24,6 +23,11 @@ from purpose_agent.experience_replay import ExperienceReplay
|
|
| 24 |
from purpose_agent.optimizer import HeuristicOptimizer
|
| 25 |
from purpose_agent.orchestrator import Orchestrator, Environment, SimpleEnvironment, TaskResult
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# ββ V2 Kernel βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 28 |
from purpose_agent.v2_types import RunMode, MemoryScope, PurposeScoreV2
|
| 29 |
from purpose_agent.trace import Trace, TraceEvent
|
|
@@ -34,7 +38,7 @@ from purpose_agent.memory_ci import MemoryCI
|
|
| 34 |
from purpose_agent.evalport import EvalCase, EvalPort, DictEvalPort, ScoreBundle
|
| 35 |
from purpose_agent.benchmark_v2 import BenchmarkRunnerV2, V2BenchmarkResult
|
| 36 |
|
| 37 |
-
# ββ V3 Runtime
|
| 38 |
from purpose_agent.runtime.events import PAEvent, EventKind, Visibility, create_event
|
| 39 |
from purpose_agent.runtime.event_bus import EventBus, parallel_merge
|
| 40 |
|
|
@@ -75,7 +79,7 @@ from purpose_agent.hitl import (
|
|
| 75 |
CLIInputHandler, AutoApproveHandler, InterruptType,
|
| 76 |
)
|
| 77 |
|
| 78 |
-
# ββ Evaluation
|
| 79 |
from purpose_agent.evaluation import BenchmarkTask, BenchmarkRunner, BenchmarkResult
|
| 80 |
|
| 81 |
# ββ Plugin Registry ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -102,23 +106,25 @@ __all__ = [
|
|
| 102 |
"OpenAICompatibleBackend", "ChatMessage", "resolve_backend",
|
| 103 |
"Actor", "PurposeFunction", "ExperienceReplay", "HeuristicOptimizer",
|
| 104 |
"Orchestrator", "Environment", "SimpleEnvironment", "TaskResult",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
# V2 Kernel
|
| 106 |
"RunMode", "MemoryScope", "PurposeScoreV2",
|
| 107 |
"Trace", "TraceEvent",
|
| 108 |
"MemoryStore", "MemoryCard", "MemoryKind", "MemoryStatus",
|
| 109 |
"PromptCompiler", "CompiledPrompt",
|
| 110 |
-
"scan_memory", "ScanResult",
|
| 111 |
-
"MemoryCI",
|
| 112 |
"EvalCase", "EvalPort", "DictEvalPort", "ScoreBundle",
|
| 113 |
"BenchmarkRunnerV2", "V2BenchmarkResult",
|
| 114 |
-
# V3 Runtime
|
| 115 |
"PAEvent", "EventKind", "Visibility", "create_event",
|
| 116 |
"EventBus", "parallel_merge",
|
| 117 |
# Research
|
| 118 |
"MetaRewardingLoop", "SelfTaughtEvaluator",
|
| 119 |
"PromptOptimizer", "Signature", "Demonstration",
|
| 120 |
-
"LLMCompiler", "ExecutionPlan", "TaskNode",
|
| 121 |
-
"Retroformer",
|
| 122 |
# SLM
|
| 123 |
"OllamaBackend", "LlamaCppBackend", "SLMPromptCompressor",
|
| 124 |
"create_slm_backend", "SLM_REGISTRY",
|
|
|
|
| 1 |
"""
|
| 2 |
purpose_agent β A local-first self-improvement kernel for agents.
|
| 3 |
|
| 4 |
+
v3.0 features: event runtime, durable execution, memory homeostasis,
|
| 5 |
+
protocol interop, intelligent routing, skill evolution, agentic optimization,
|
| 6 |
+
AND first-principles engineering (O(1) critic, falsification scoring, PEP 578 sandbox).
|
|
|
|
| 7 |
"""
|
| 8 |
|
| 9 |
__version__ = "3.0.0a1"
|
|
|
|
| 23 |
from purpose_agent.optimizer import HeuristicOptimizer
|
| 24 |
from purpose_agent.orchestrator import Orchestrator, Environment, SimpleEnvironment, TaskResult
|
| 25 |
|
| 26 |
+
# ββ First-Principles (NEW) βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 27 |
+
from purpose_agent.state_delta import compute_state_delta, StateDelta, format_critic_input
|
| 28 |
+
from purpose_agent.falsification_critic import FalsificationCritic, FalsificationResult
|
| 29 |
+
from purpose_agent.sandbox_hooks import install_sandbox, SandboxPolicy, SandboxViolation, is_sandbox_installed
|
| 30 |
+
|
| 31 |
# ββ V2 Kernel βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 32 |
from purpose_agent.v2_types import RunMode, MemoryScope, PurposeScoreV2
|
| 33 |
from purpose_agent.trace import Trace, TraceEvent
|
|
|
|
| 38 |
from purpose_agent.evalport import EvalCase, EvalPort, DictEvalPort, ScoreBundle
|
| 39 |
from purpose_agent.benchmark_v2 import BenchmarkRunnerV2, V2BenchmarkResult
|
| 40 |
|
| 41 |
+
# ββ V3 Runtime ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 42 |
from purpose_agent.runtime.events import PAEvent, EventKind, Visibility, create_event
|
| 43 |
from purpose_agent.runtime.event_bus import EventBus, parallel_merge
|
| 44 |
|
|
|
|
| 79 |
CLIInputHandler, AutoApproveHandler, InterruptType,
|
| 80 |
)
|
| 81 |
|
| 82 |
+
# ββ Evaluation βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 83 |
from purpose_agent.evaluation import BenchmarkTask, BenchmarkRunner, BenchmarkResult
|
| 84 |
|
| 85 |
# ββ Plugin Registry ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 106 |
"OpenAICompatibleBackend", "ChatMessage", "resolve_backend",
|
| 107 |
"Actor", "PurposeFunction", "ExperienceReplay", "HeuristicOptimizer",
|
| 108 |
"Orchestrator", "Environment", "SimpleEnvironment", "TaskResult",
|
| 109 |
+
# First-Principles
|
| 110 |
+
"compute_state_delta", "StateDelta", "format_critic_input",
|
| 111 |
+
"FalsificationCritic", "FalsificationResult",
|
| 112 |
+
"install_sandbox", "SandboxPolicy", "SandboxViolation", "is_sandbox_installed",
|
| 113 |
# V2 Kernel
|
| 114 |
"RunMode", "MemoryScope", "PurposeScoreV2",
|
| 115 |
"Trace", "TraceEvent",
|
| 116 |
"MemoryStore", "MemoryCard", "MemoryKind", "MemoryStatus",
|
| 117 |
"PromptCompiler", "CompiledPrompt",
|
| 118 |
+
"scan_memory", "ScanResult", "MemoryCI",
|
|
|
|
| 119 |
"EvalCase", "EvalPort", "DictEvalPort", "ScoreBundle",
|
| 120 |
"BenchmarkRunnerV2", "V2BenchmarkResult",
|
| 121 |
+
# V3 Runtime
|
| 122 |
"PAEvent", "EventKind", "Visibility", "create_event",
|
| 123 |
"EventBus", "parallel_merge",
|
| 124 |
# Research
|
| 125 |
"MetaRewardingLoop", "SelfTaughtEvaluator",
|
| 126 |
"PromptOptimizer", "Signature", "Demonstration",
|
| 127 |
+
"LLMCompiler", "ExecutionPlan", "TaskNode", "Retroformer",
|
|
|
|
| 128 |
# SLM
|
| 129 |
"OllamaBackend", "LlamaCppBackend", "SLMPromptCompressor",
|
| 130 |
"create_slm_backend", "SLM_REGISTRY",
|