Claim class
A verifiable assertion - the single canonical type for all packages.
Used by:
- mcp_skill: Creates claims with minimal required fields
- mcp_fact_graph: Uses all fields for verification workflow
- SkillFactGraphPort: Interface type for claim exchange
Constructors
-
Claim({required String id, required String workspaceId, required String text, required ClaimType type, dynamic value, String? subject, String? predicate, String? object, String? sourceId, required List<
String> evidenceRefs, List<String> contradictingRefs = const [], required double confidence, ClaimStatus status = ClaimStatus.pending, String? conflictReason, DateTime? verifiedAt, DateTime? createdAt, Map<String, dynamic> ? metadata}) -
const
-
Claim.fromJson(Map<
String, dynamic> json) -
Parse from JSON.
factory
Properties
- confidence → double
-
Confidence score (0.0 to 1.0).
final
- conflictReason → String?
-
If status is 'conflicting', explains why.
final
-
contradictingRefs
→ List<
String> -
Evidence IDs contradicting this claim.
final
- createdAt → DateTime?
-
Creation timestamp.
final
-
evidenceRefs
→ List<
String> -
Evidence IDs supporting this claim.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasRdfStructure → bool
-
Check if claim has RDF structure.
no setter
- id → String
-
Unique claim identifier (UUID).
final
- isSupported → bool
-
Check if claim is supported.
no setter
- isVerified → bool
-
Check if claim is verified.
no setter
-
metadata
→ Map<
String, dynamic> ? -
Additional context-specific data.
final
- object → String?
-
RDF object (optional).
final
- predicate → String?
-
RDF predicate/relationship (optional).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceId → String?
-
Source context (responseId, skillRunId, etc.).
final
- status → ClaimStatus
-
Verification status.
final
- subject → String?
-
RDF subject (optional).
final
- text → String
-
Human-readable claim text (statement).
final
- type → ClaimType
-
Semantic type of the claim.
final
- value → dynamic
-
Structured value (parsed from text).
final
- verifiedAt → DateTime?
-
Verification timestamp.
final
- workspaceId → String
-
Workspace for multi-tenant isolation.
final
Methods
-
copyWith(
{String? id, String? workspaceId, String? text, ClaimType? type, dynamic value, String? subject, String? predicate, String? object, String? sourceId, List< String> ? evidenceRefs, List<String> ? contradictingRefs, double? confidence, ClaimStatus? status, String? conflictReason, DateTime? verifiedAt, DateTime? createdAt, Map<String, dynamic> ? metadata}) → Claim - Create a copy with updated fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override