Core orchestrator and session primitives proxy.
Exposes the live orchestrator, its configuration, session handle, window DAG, manifest ledger, and LLM-in-the-loop facilitator.
Source code in crp/sdk/proxies_more.py
| class _CoreProxy:
"""Core orchestrator and session primitives proxy.
Exposes the live orchestrator, its configuration, session handle, window
DAG, manifest ledger, and LLM-in-the-loop facilitator.
"""
def __init__(self, orchestrator: Any) -> None:
self._orchestrator = orchestrator
def orchestrator(self) -> Any:
"""Return the live ``CRPOrchestrator`` instance.
Returns:
CRPOrchestrator instance.
"""
return self._orchestrator
def config(self) -> Any:
"""Return the orchestrator's core configuration object.
Returns:
CRPConfig instance.
"""
return getattr(self._orchestrator, "_config", None)
def session(self) -> Any:
"""Return the current ``SessionHandle``.
Returns:
SessionHandle instance.
"""
return getattr(self._orchestrator, "_session", None)
def dag(self) -> Any:
"""Return a fresh ``WindowDAG`` instance.
Returns:
WindowDAG instance.
"""
from crp.core.window import WindowDAG
return WindowDAG()
def ledger(self) -> Any:
"""Return a ``ManifestLedger`` bound to the current session.
Returns:
ManifestLedger instance.
"""
from crp.core.manifest_ledger import ManifestLedger
session_id = ""
session = getattr(self._orchestrator, "_session", None)
if session is not None:
session_id = getattr(session, "session_id", "") or session_id
return ManifestLedger(session_id=session_id)
def facilitator(self) -> Any:
"""Return a ``CRPFacilitator`` wired to the orchestrator's provider.
Returns:
CRPFacilitator instance.
"""
from crp.core.facilitator import CRPFacilitator
return CRPFacilitator(
provider=getattr(self._orchestrator, "_provider", None),
warm_store=getattr(self._orchestrator, "warm_store", None),
)
|
orchestrator()
Return the live CRPOrchestrator instance.
Returns:
| Type | Description |
Any | CRPOrchestrator instance. |
Source code in crp/sdk/proxies_more.py
| def orchestrator(self) -> Any:
"""Return the live ``CRPOrchestrator`` instance.
Returns:
CRPOrchestrator instance.
"""
return self._orchestrator
|
config()
Return the orchestrator's core configuration object.
Returns:
Source code in crp/sdk/proxies_more.py
| def config(self) -> Any:
"""Return the orchestrator's core configuration object.
Returns:
CRPConfig instance.
"""
return getattr(self._orchestrator, "_config", None)
|
session()
Return the current SessionHandle.
Returns:
Source code in crp/sdk/proxies_more.py
| def session(self) -> Any:
"""Return the current ``SessionHandle``.
Returns:
SessionHandle instance.
"""
return getattr(self._orchestrator, "_session", None)
|
dag()
Return a fresh WindowDAG instance.
Returns:
Source code in crp/sdk/proxies_more.py
| def dag(self) -> Any:
"""Return a fresh ``WindowDAG`` instance.
Returns:
WindowDAG instance.
"""
from crp.core.window import WindowDAG
return WindowDAG()
|
ledger()
Return a ManifestLedger bound to the current session.
Returns:
Source code in crp/sdk/proxies_more.py
| def ledger(self) -> Any:
"""Return a ``ManifestLedger`` bound to the current session.
Returns:
ManifestLedger instance.
"""
from crp.core.manifest_ledger import ManifestLedger
session_id = ""
session = getattr(self._orchestrator, "_session", None)
if session is not None:
session_id = getattr(session, "session_id", "") or session_id
return ManifestLedger(session_id=session_id)
|
facilitator()
Return a CRPFacilitator wired to the orchestrator's provider.
Returns:
Source code in crp/sdk/proxies_more.py
| def facilitator(self) -> Any:
"""Return a ``CRPFacilitator`` wired to the orchestrator's provider.
Returns:
CRPFacilitator instance.
"""
from crp.core.facilitator import CRPFacilitator
return CRPFacilitator(
provider=getattr(self._orchestrator, "_provider", None),
warm_store=getattr(self._orchestrator, "warm_store", None),
)
|