InternalContextBundle class

InternalContextBundle represents an internal context bundle for LLM operations.

Extends the port-level ContextBundle (from mcp_bundle) with implementation details for context generation. Reference: Design Section 2.15.2

Constructors

InternalContextBundle({required String bundleId, required String workspaceId, required String query, List<Fact> facts = const [], List<SummaryNode> summaries = const [], List<String> evidenceRefs = const [], List<OpenQuestion> openQuestions = const [], int tokenEstimate = 0, required DateTime asOf, required String policyVersion, BundleBudget budget = const BundleBudget(), required DateTime createdAt, Map<String, dynamic> metadata = const {}})
const
InternalContextBundle.fromJson(Map<String, dynamic> json)
factory

Properties

asOf DateTime
Point-in-time snapshot for reproducibility. Reference: Design Section 2.15.2 - enables time-travel queries.
final
budget BundleBudget
Budget constraints for context generation. Reference: Design Section 2.15.2 - BundleBudget support.
final
bundleId String
Unique bundle identifier.
final
createdAt DateTime
When this bundle was created.
final
evidenceRefs List<String>
Evidence/content references. Reference: Design Section 2.15.2 - List
final
facts List<Fact>
Confirmed facts (latest, supersedes reflected). Reference: Design Section 2.15.2 - List
final
hashCode int
The hash code for this object.
no setteroverride
hasOpenQuestions bool
Check if bundle has unresolved questions.
no setter
isWithinBudget bool
Check if bundle is within token budget.
no setter
metadata Map<String, dynamic>
Additional metadata.
final
openQuestions List<OpenQuestion>
Unresolved items/conflicts requiring attention. Reference: Design Section 2.15.2 - OpenQuestion support.
final
policyVersion String
Policy version used for generating this bundle. Reference: Design Section 2.15.2 - enables reproducibility.
final
query String
Query or prompt this context is for.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
summaries List<SummaryNode>
Relevant cumulative summaries. Reference: Design Section 2.15.2 - List
final
tokenEstimate int
Total token count estimate.
final
workspaceId String
Workspace identifier for multi-tenant isolation.
final

Methods

copyWith({String? bundleId, String? workspaceId, String? query, List<Fact>? facts, List<SummaryNode>? summaries, List<String>? evidenceRefs, List<OpenQuestion>? openQuestions, int? tokenEstimate, DateTime? asOf, String? policyVersion, BundleBudget? budget, DateTime? createdAt, Map<String, dynamic>? metadata}) InternalContextBundle
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override