research

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package research defines an optional, revisioned evidence system of record. Collection, browsing, storage encryption, and report presentation remain host responsibilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assessment

type Assessment struct {
	UnsupportedClaims  []string `json:"unsupported_claims,omitempty"`
	ContradictedClaims []string `json:"contradicted_claims,omitempty"`
	Coverage           float64  `json:"coverage"`
}

type CitationVerifier

type CitationVerifier interface {
	Verify(context.Context, SourceSnapshot, Evidence) error
}

CitationVerifier can perform domain-specific locator and quotation checks against the immutable source snapshot referenced by an evidence record.

type Claim

type Claim struct {
	ID            string `json:"id"`
	StatementHash string `json:"statement_hash"`
	Status        string `json:"status"`
}

type ClaimEvidence

type ClaimEvidence struct {
	ClaimID    string   `json:"claim_id"`
	EvidenceID string   `json:"evidence_id"`
	Relation   Relation `json:"relation"`
	Strength   float64  `json:"strength"`
}

type Evidence

type Evidence struct {
	ID               string  `json:"id"`
	SourceSnapshotID string  `json:"source_snapshot_id"`
	Locator          string  `json:"locator"`
	ExcerptHash      string  `json:"excerpt_hash"`
	Quality          float64 `json:"quality"`
}

type Graph

type Graph struct {
	ID        string             `json:"id"`
	Owner     execution.Identity `json:"owner"`
	Sources   []SourceSnapshot   `json:"sources"`
	Evidence  []Evidence         `json:"evidence"`
	Claims    []Claim            `json:"claims"`
	Edges     []ClaimEvidence    `json:"edges"`
	Revision  uint64             `json:"revision"`
	UpdatedAt time.Time          `json:"updated_at"`
}

func (Graph) Assess

func (g Graph) Assess(minStrength float64) Assessment

func (Graph) Validate

func (g Graph) Validate() error

func (Graph) VerifyCitations

func (g Graph) VerifyCitations(ctx context.Context, verifier CitationVerifier) error

type MemoryStore

type MemoryStore struct {
	// contains filtered or unexported fields
}

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) CompareAndSwap

func (s *MemoryStore) CompareAndSwap(ctx context.Context, owner execution.Identity, id string, expected uint64, next Graph) (Graph, error)

func (*MemoryStore) Create

func (s *MemoryStore) Create(ctx context.Context, graph Graph) (Graph, error)

func (*MemoryStore) Get

func (s *MemoryStore) Get(ctx context.Context, owner execution.Identity, id string) (Graph, bool, error)

type Relation

type Relation string
const (
	RelationSupports    Relation = "supports"
	RelationContradicts Relation = "contradicts"
)

type SourceSnapshot

type SourceSnapshot struct {
	ID          string    `json:"id"`
	Locator     string    `json:"locator"`
	Digest      string    `json:"digest"`
	ContentRef  string    `json:"content_ref"`
	CapturedAt  time.Time `json:"captured_at"`
	ContentType string    `json:"content_type,omitempty"`
}

type Store

type Store interface {
	Create(context.Context, Graph) (Graph, error)
	CompareAndSwap(context.Context, execution.Identity, string, uint64, Graph) (Graph, error)
	Get(context.Context, execution.Identity, string) (Graph, bool, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL