-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathcontext.py
More file actions
33 lines (27 loc) · 1.09 KB
/
context.py
File metadata and controls
33 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""HarnessContext — the assembled unit handed to every turn and every tool.
v4.1 §2.1 describes the harness as "one bundled thing": LLM + tools + scope-
aware semantic + session + safety + explorer + audit. The ContextConcierge
(tenancy) builds one of these per request; the agent loop and ctx-aware tools
read from it. Optional fields are the pieces a bare CLI smoke-test can omit.
"""
from __future__ import annotations
from dataclasses import dataclass
from ..core.identity import Identity
from ..core.ports.audit import AuditPort
from ..core.ports.explorer import ExplorerPort
from ..core.ports.llm import LLMPort
from ..core.ports.safety import SafetyPipelinePort
from ..core.ports.semantic_scope import ScopeResolverPort
from .session import Session
from .tool_registry import ToolRegistry
@dataclass
class HarnessContext:
identity: Identity
llm: LLMPort
tools: ToolRegistry
session: Session
explorer: ExplorerPort | None = None
safety: SafetyPipelinePort | None = None
audit: AuditPort | None = None
scope_resolver: ScopeResolverPort | None = None
max_turns: int = 8