Rohan03 commited on
Commit
ecad107
Β·
verified Β·
1 Parent(s): 74d6368

gradual-adoption: export state_delta, falsification_critic, sandbox_hooks from __init__

Browse files
Files changed (1) hide show
  1. 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 adds: canonical event runtime, AG-UI streaming, durable execution (planned).
5
-
6
- Architecture based on 13+ published papers.
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 (NEW) ─────────────────────────────────────────────────────
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 (V1 compat) ──────────────────────────────────────────────
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 (NEW)
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",